mathjax: Put loading of mathjax at the end of the page.

This way, we might have a chance of loading the page faster, since loading
JavaScript is a potentially blocking operation for browsers.

This is also a recommended practice given by services like Google's
[PageSpeed Insights][0].

[0]: https://developers.google.com/speed/pagespeed/insights/

Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
mathjax: Load JavaScript asynchronously.

Complementary to putting the JavaScript at the bottom of a page, we can
(should?) use the `async` attribute of the `script` element. See
<http://www.w3schools.com/tags/att_script_async.asp> for a brief
description/demo.

Note that I have opted to use the long form of the async attribute for
compatibility with XHTML, as discussed in the document above.

Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
Merge pull request #1 from rbrito/upstream

Minor optimizations