Well, one way to explain the convenient ending is to take a page from the comics. The great power source they called "the tesseract" was a version of the cosmic cube from the comics stories. The cube was not just an energy source; it was essentially a wish fulfillment device. If the person holding the cube realized what he had, he would have the power to remake all reality as he saw fit; he would be a true god.
How does that matter to this discussion? Well, the nuke that Tony rode through the rift was "phase 2" and infused with energy from the cube. The use of the energy to that point was simple; you put it in a gun and it fires with the force the user expects; you put it in a nuke and get the force you expect; etc. But Tony was probably wishing for something more as he hugged that nuke; he was wishing to save his friends and loved ones. The cube energy granted his wish.
Anyway, that's how I would explain it. It's consistent with the comics and what we saw with the cube in the movies (Red Skull wanted to be one with the universe and got his wish). Even the ending of Avengers fits the mold; Thor wished to go home and so he did. I imagine it is one of Odin's great secrets; he told everyone that the cube was just a great power source hoping that was all anyone would ever expect it to be.
On one last note, it's interesting to think of Captain America's shield here. The shield is made of material that absorbs energy, and it spent years absorbing cube energy from the Hydra weapons. Is Cap so formidable with the shield because the residual energy is granting his wish to be formidable with it? It would be a self reinforcing wish; each time the shield does what he wants, it leads him to expect it (and thus wish it so). Throws a new twist on the old stand-by of Cap's shield always coming back to him every time he throws it.