Use XMLSerializer and DOMParser instead of jquery.

Jquery often changes a file into an html file instead. EPUB wants xhtml.
We need the dom-to-xhtml plugin, otherwise parsererror results after the first edit.
Avoid using "undefined" in head and body of new document.
Handle legacy html entities

For EPUB 3, the content should be html5 compliant xhtml. This means
you can only use amp, lt, gt, quot and apos entities, unless you declare
the dtd in the doctype. This change attempts to parse legacy xhtml and change
it to more compliant html.
If contents isn't xhtml, retry as html, and convert.

This will allow legacy ebooks to open, converting the content to
xhtml. Though the change is a few lines, it took a lot of effort to
figure out how to get chrome's XMLSerializer to create actual xml. In
the end, the fix was two lines: Create a new xhtml document, and clone the old
one's contents into it.
Merge branch 'less-less-logging' into better-xhtml-handling-v2
Prevent doubling up of `<body>` tag.

Documents with images caused updates to the model, using XMLSerializer.
Unfortunately I serialized the body container along with all the content
causing the body tag to double up.
Merge pull request #149 from oerpub/better-xhtml-handling-v2

Use XMLSerializer and DOMParser instead of jquery.