extract chapter endnotes into separate files

fixes #160

 * when joining HTML files (epub3-to-html), remove document partition (such as "bodymatter") from sections that become nested
 * when joining HTML files, fix the heading hierarchy afterwards
 * when splitting a HTML file (html-split), rearnotes are extracted into their own files (just like chapters from parts)
 * when splitting a HTML file, fix the heading hierarchy of the result
 * updated tests accordingly
Merge pull request #169 from nlbdev/issue-160

extract chapter endnotes into separate files