Use multiple HTML files for ebook generation

# :warning: not yet ready to be merged

Fix #467, #458, #447, #412