initial epub support

This is still a WIP. I still need to embed MathJax, but the all the three.js content is working (although it needs some work to look good in epubs).