Fix frame switching after frame redirect/creation

This fixes #967 and also resolves #1001.

This has been tested initially on [this sandbox](http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe) and then on [r/videos](http://www.reddit.com/r/videos) (you may need RES enabled).
A valid `frames.frameIndex` can be `0`, can it not?  Also, is `frames.frameIndex` guaranteed to have been set?

Would the following be correct?

    currIndex = frames?.frameIndex? or getCurrFrameIndex(frames)