GreaseMonkey: Add GM_setClipboard function available to scripts

Also update GM_openInTab to return created window object
GreaseMonkey: Fix scripts sometimes not running in frames

Check for document.readyState and if it is "complete", run
the script immediately instead of adding event listener for
DOMContentLoaded that already fired