EPUB writer:  math with `--webtex` is automatically made self-contained.

And some code cleanup.