Make HTTPS Everywhere compatible with e10s (multiprocess firefox)

Work in progress. As of now, rewrites work and the basic UI features work.

fixes #447 #510 

TODO:
* check for backwards compatibility
What a confusing passage. I thought "browser window" was referring to the "chrome" window that contains all the tabs, not the window inside each tab that contains the page. Then the edge case where gBrowser is not defined in onStateChange never happens because `toolbarButton.init` only gets called once the window is loaded.

In any case, I added some dumps and couldn't find an example of gBrowser being undefined in onStateChange.