Use wp_enqueue_script instead of handwriting a <script> tag.

Use wp_enqueue_script both to avoid handwriting a <script> tag, and so
that other plugins can use 'mathjax' as a dependency.

My writemaths plugin uses 'mathjax' as a dependency so WP ensures MathJax is loaded before my script runs.

I had to move the config tag to the header because WP likes putting its scripts in the head.