Strip off the <html> envelope.
Move preventDefault earlier in changeHeading

Any errors in later processing causes the browser to follow the link, because
it never reaches the preventDefault. If we're going to prevent the click from
following the anchor anyway, might as well do it first.
protect against Aloha.currentEditable being null upon heading changes.
Fixed popover.hide not to break chaining.

This means that the monkey-patched destroy() was never necessary,
so this has been dropped too.
don't let mousedown on actions propagate

This prevents a click on the toolbar from deactivating the current
editor.
mousedown on popover does not propagate

This prevents the event from reaching aloha and causing the editor
to deactivate, which allows clicking on popovers without the popover
closing on you.
Hide popover before destroying it.

Otherwise it thinks it is visisble and refuses to show up again on
click.
Namespace the show and hide events so they clean up.

The show and hide events, bound via delegation to the editor itself, did not
clean up properly, so there was this ever growing list of hide/show events on
every math element, which likely caused severe performance issues. Adding
a namespace ensures that it is cleaned up when .bubble is off()'ed.
Formatting change in comments, no functionality.  dead code cleanup
Replace aloha-editable-activated with -created.

Also unify the various event handlers all bound to the same event into one.
Use -created event rather than -activated, this code need only run once,
and in our old code where the editor was never deactivated, that is how it
worked anyway.
Avoid binding multiple mousedown handlers to body.
Avoid rebinding deprecated focus/blur callbacks more than once.
Delay cleanup of delegated event handlers on deactivation till last

If you trigger 'hide' after you've cleaned up the event handler, it's not
going to work is it?
Don't glue link popover to math tooltips

Specifically, the X that removes math is an <a>, but it isn't a link. This is
a generic fix that won't place popovers on anything that is marked as ephemera.
Use jQuery instead of $, correctly defined module name.
Make the body background gray, avoid the white block at the bottom.
refs #374: have ephemera remove the data-original-title attribute that bootstraps inserts for tooltips.
Merge branch 'dev' of github.com:wysiwhat/Aloha-Editor into dev
Comment reason for excluding ephemera links.
Let requirejs name the popover plugin instead of explicitly naming it.

Explicitly naming the popover plugin appears to trigger a race condition that
results in a namespace conflict. The issue appears to be that there is both
a directory named popover and a module named popover. The browser loads the
modules asynchronously. If the popover module has finished loading by the time
math, image or link loads, nothing bad happens. If the popover module has not
finished loading, it attempts to load it again, finds the popover directory
and attempts to load lib.js in that directory. By not explicitly naming
the popover module, it will be named popover/popover-plugin automatically,
which in turn resolves the namespace issue.

Refs #347.