Move <script> tags to top of body. Fixes #504

Having `<script>` tags at the bottom of the `<body>` cause some widgets that rely upon JavaScript to fail, as the required libraries have not been loaded at the point where the widgets are added to the page.

I understand that placing `<script>` tags at the bottom of the `<body>` tag is done for speed and user experience reasons, but unfortunately many Django widgets that use JavaScript (including widgets from the geodjango package shipped with Django) assume that the `<script>` tags are placed in the page *before* the widget is rendered. Many widgets break with `<script>`s placed down the bottom.

Moving scripts to the top of the `<body>` will fix the issue, and will not measurable harm user experience. `<script>` is placed at the bottom so that the page renders quickly so that new visitors do not bounce away again out of frustration. This is not a concern with a administration area. Users are deliberately going there, so will happily wait for a small amount of extra time. Additionally, the number of new visitors without the JavaScript cache will be extremely small compared to the number of return visitors (i.e. administrators of the site)