Apply plugins to ebook generation

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.