Apply plugins to ebook generation

# not yet ready to be merged

This PR extends the ebook generation (html page ->pdf/epub/mobi) to use plugins. For example https://github.com/GitbookIO/plugin-katex will be able to work on pdf/epub.