[PR] Refactor handling of Javascript

* Enqueues scripts using WordPress rather than outputting directly in `<head>`
* Uses jQuery provided by WordPress, continues to use full jQuery UI package at Google to meet dependencies.
* Moves many scripts to the footer as they are not required during page load.