Get sidebar code running in a panel in new versions of Firefox

Supercedes PR #357. All reviewing comments addressed. 

Gets the sidebar code working in panels, a la:

https://trello.com/c/lX521lFu/304-2-as-a-user-i-can-use-talkilla-in-a-panel-rather-than-a-sidebar

This should be ready for review.

Note that a few things have been left for upcoming cards:

* work correctly in a version of Firefox different from the one the user installed it in
* serve Windows-specific icons for windows
* debug signout intermittent failures (logging added for this)
* debug intermittent incorrect sizing of panel content to be unusuably small

(These last two will only get cards if someone actually reproduces them again).