Make logging safer, only log if there is a console.
A better attempt at placing the cursor after math

When math element is closed, place cursor after the element.

When pressing ctrl+M, mathify and immediately place cursor
after math.

Conflicts:

	src/plugins/oer/math/lib/math-plugin.js
Merge pull request #11 from oerpub/oerpub-ticket415-pull

Place cursor after math when closing popover