This と simply marks quoted speech like the speech marks "" in English. The difference is that in English we only ever use "" for direct quotes e.g.
He said "I'm going to Japan".
but we don't use "" for indirect quotes e.g.
He said he was going to Japan.
However, in Japanese と would be required for both of these.
I feel this is a difficult question even to some native speakers... The meaning of the first sentence is "No matter what you are going to find (e.g., in this dungeon), it must be something incredibly dangerous." For this ようと, see: What are the grammar rules behind this clause, 「才能があろうがなかろうが」? and Meaning of volitional passive form
So, you are supposed to ...
Yes, the order matters. Since things before the と will be treated as a part of the quote, お前とはもう別れたいまでと言われた sounds like he actually said "別れたいまで", which makes no sense in this context. It's somewhat like "He even said that ～" vs "He said that even ～". In general, when two particles are combined, the order is almost always important (e.g., you can say 学校では ...
Have you learned about quotative-と, which is typically used with 思う, 考える, etc? This と is not "when/if", but quotative. That is, 街灯じゃ暗い is what the crow "said" or "thought" (of course it's a personification).
A crow laughed, (as if saying) "Street lights are dark!"
笑った is just the past tense of 笑う, and it has nothing to do with this ...
と is frequently used as a "quoting" particle, for thoughts or for speech.
〜と思います is "I think that〜", with the thought being "quoted" coming in the 〜. Similarly, you can have 〜と考えます (I think that 〜), 〜と信じます (I believe that 〜), and similar examples.
Likewise, と言う used with the kanji means "I (will) say that〜".
However, という used without the kanji tends to ...