get sidebar code running in a panel

Supercedes PR #343. Rebased against master, implemented debugging add-on

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

A few more things before this is ready for review; see the Trello card for details.