ToC Editor: handle files with <p> inside <head>

ToC Editor: Handle ebooks that have <p> tags inside the <head> tags.
Instead of erroring out, the <p> tags are automatically moved into
<body>. Fixes #1186298 [Problem with the Edit ToC feature](https://bugs.launchpad.net/calibre/+bug/1186298)