When a popover is closed, clear insideScope

insideScope remembers the item on which the popover is currently open. This
is used to determine, on selection change, whether a popover needs to be
opened. It needs to be cleared when a popover is closed, otherwise it becomes
impossible to open a popover on the same element immediately afterwards.

Refs #385.
Merge pull request #36 from wysiwhat/oerpub-ticket385

When a popover is closed, clear insideScope
Use jquery to process ajax loaded html

This deals better with xhtml. innerHTML does not deal with it at all well.
Move mousedown handler completely out of event handlers.

This fixes #409. The way it was it would add and remove the mousedown
handler multiple times (for each plugin that uses popovers). It seems a race
condition then ensured that it wasn't added at all. With this change, it is
added once when the module is loaded.
Merge pull request #40 from wysiwhat/oerpub-ticket409

Move mousedown handler completely out of event handlers.
Avoid errors with undefined populator, selector

For reasons I could not determine, and which disappear whenever you add a
debugger to the mix (that is, it is a race condition), The populator and helper
members are sometimes undefined causing errors. In addition, this code makes
sure we don't get the entire hierarchy if more than one parent matches
the selector, for we most certainly don't want more than one popup.

Fixes #408.
Sync with coffee
Rename mimeType to type inside keyDelay function

It overwrites the mimeType variable in the outside scope. Not harmful
as used here (yet) but likely not what was intended.
Add Plain Text option to math popover

This allows math to be converted back to plain text. Fixes #413.
Merge pull request #38 from wysiwhat/oerpub-xhtml-fix

Use jquery to process ajax loaded html
Merge pull request #3 from oerpub/oerpub-ticket408

Avoid errors with undefined populator, selector
Merge pull request #5 from oerpub/oerpub-ticket413-pull

Add feature to math popover that allows user to set content back to plain text
Merge remote-tracking branch 'origin/master' into block-bugfixes

Conflicts:
	src/plugins/oer/popover/lib/popover-plugin.js