Dragons don't seem too difficult to corrupt, given everything that happened in (and leading up to) the Emerald Nightmare. Ysera had been one of the original Dragon Aspect and Xavius was able to corrupt her instantly. I don't see an Old God having any trouble doing the same to Kalecgos. They've been significantly weaker since they gave up their immortality to stop Deathwing.
The five keys are most likely the Pillars of Creation. We've collected 4 while leveling, and the 5th one is in the Nighthold. The Raven could easily be Khadgar, since he uses Aetiesh's raven form to fly around. I wouldn't be surprised if he used the Pillars to stop the Legion and accidentally released N'Zoth from its prison in the process.
It doesn't have to be betrayal. Khadgar can sometimes be impulsive and do something reckless. The entire Warlords of Draenor legendary campaign was a pretty good example. He took many risks with rituals that could have gone very bad, very quickly. He tried to torture Garona because he was obsessed with finding Gul'dan. It definitely wouldn't be out of character for him to take another big gamble with magics he does not fully master, and actually failing this time.