Fix iframe creation and finding code

This fix changes the code to only use the iframe with the `history-iframe` id, preventing SPF from using iframes that don't share the same origin. This change also treats the iframe element like an `HTMLIFrameElement`, not a `Window`. This should result in the correct behavior.