Replace images on the fly

By wrapping the TeX-images in MathJax_Preview spans and attaching the script immediately afterwards, MathJax will replace them on the fly. The extra scaling for display equations was moved into its own loop, not sure how to do this more efficiently.