Fixed hiding editor panels, and tidied up other JS.
Bug fixes.

* Fixed card flip transition causing editor controls to be inaccessible.
* Moved plugin menu out of the plugin card, to solve issues with z-index
overlaps with other cards.
* Custom elements now have all their event handlers removed as
appropriate.