When pasting, retypeset math to get back context menu.

Also, use range machinery to insert pasted content. This is necessary because
InsertHtml breaks if any inserted content has no style property (math elements
doesn't), and insertIntoDOM pastes the content AFTER the selected paragraph,
when pasting content on a new line. This does the right thing by pasting it
inside the paragraph, or any other place your cursor might be.