Re: SUPER UBER SPOILERMANIA: The Ending... What Does It Mean?
Didn't Loki (disguised as the guard) tell Odin that he'd found one body back on Svartalfheim?
What if he told him that the body was that of Jane's, and that Thor and Loki were missing...presumably captured or killed by the Dark Elves. Odin may have seen fit to go after them himself (Heimdall's vision of Thor and Jane may have been obscured by the Convergence, the Aether, or the just the presence of the Dark Elves themselves). So Odin ventures off to find them on Svartalfheim (maybe with a few men, who knows?)...
With the real Odin gone, Loki (disguised as Odin) commands Heimdall to be thrown into the dungeons for his treason, perhaps even into solitary confinement so he can't let anyone know what actually happened. Loki replaces Heimdall with a "fake" one (perhaps an illusion or him masking someone as Heimdall) to do his bidding. Without the real Heimdall, no one is there to let Odin back in to Asgard.
And there you have it...Odin stranded on the dead and deserted world of Svartalfheim (we haven't seen any evidence of Odin being able to communicate or travel through space), the real Heimdall locked away, and Loki sitting pretty on the throne with no one the wiser (especially Thor).
Phase 1 >>> IM - TIH - IM2 - Thor - CA: TFA - The Avengers
Phase 2 >>> IM3 - Thor: TDW - CA: TWS - GotG - Avengers: Age of Ultron - Agents of SHIELD
Phase 3 >>> Ant-Man - Daredevil - Jessica Jones - Luke Cage - Iron Fist - The Defenders