Move <script> tags to top of body

Having <script> tags at the bottom of the <body> caused some widgets
that relied upon JavaScript to fail, as the required libraries had not
been loaded at the point where the widgets were added to the page.
Refactor edit handler JavaScript integration

Edit handler panels which required JavaScript provided the JavaScript in
a `render_js` function, the output of which was collected together and
inserted after the `<script>` tags in the footer. Now that the
`<script>` tags are at the top of the `<body>`, these collected
initialisations were failing when they could not find the elements.

A new set of widgets have been created: `AdminPageChooser`,
`AdminImageChooser`, `AdminSnippetChooser`, `AdminDocumentChooser`.
These widgets output the initialisation JavaScript in a `<script>` tag
immediately following the widget itself, assuming that the required
external libraries and scripts are now included further up in the page.
This is how the GeoDjango fields from Django work, as well as many other
third party widgets. It makes writing integrations for arbitary widgets
easy, as they do not have to know anything about Wagtail edit handlers.

This also removes the need for the `fixPrefix()` JavaScript function
wrapping all field initialisers. As the fields are initialised as they
are inserted in to the page, any scripts included with them are inserted
at the same time. Additionally, the `__prefix__` placeholder in empty
form fields is also present in the initialisation scripts, and is fixed
at the same time. A template tag `escapescript` has been added to help
with this, to prevent `<script>` initialisation blocks from prematurely
closing the `<script type='text/django-form-template'>` tags.
Merge branch 'bug/missing-migration' into bug/scripts-at-bottom

* bug/missing-migration:
  Add missing migrations
Fix migrations after merging in missing migrations
Fix Python 2.6 compatibility
Fix typo
Fixed admin home page for custom user models
Fixed more instances of username => get_username()
Merge pull request #691 from zerolab/seperated-separated-typo

Typo fix in wagtailforms help text
editing a page no longer redirects to explorer. success messages added to locking/unlocking process.
added missing indicators on pages_for_moderation and recent_edits
corrected redirect
mistake
creating should also remain on page after submit
tweaked empty dash appearing for non-default sites
tweaks to unusual formatting
tweaks to unusual formatting
Fixed pinned dependency versions

These can cause real headaches if you have a different version of six or requests on your host machine.

This should fix the ``pkg_resources.DistributionNotFound`` error some people have been getting with the "wagtail start" command.
fixed tests broken by new abstract class 'indicator'
Merge remote-tracking branch 'upstream/master'