Stop using unsafeWindow

Greasemonkey 2.0 doesn't support unsafeWindow anymore, for security reasons.
The workaround is putting all our code inside a script tag and running it
in the constext of the main page (just as a bookmarklet would) instead of
running it in the Greasemonkey context.

Fixes #157