Don't access Thread.current[:selected_repo_id] directly

Switch all places to use the JSONModel accessor methods instead.
Move all importers into the backend and refactor to write JSONModel objects to output files
Squashed commit of the following:

commit 7265255f468a246cdd143791b2adfb06e913323e
Author: Payten Giles <payten.giles@gmail.com>
Date:   Thu Dec 5 15:47:57 2013 +1100

    WIP Only allow selection of files once an upload type has been chosen

commit 3b810e2fdf21205cfc60c883fbbda90e18c14574
Author: Payten Giles <payten.giles@gmail.com>
Date:   Wed Dec 4 16:15:37 2013 +1100

    WIP Add basic upload of multiple files to a stub jobs form

commit a1c54bf249c8e0d1750bf7ce5f151fcc431d3a87
Author: Payten Giles <payten.giles@gmail.com>
Date:   Wed Dec 4 08:29:07 2013 +1100

    WIP multiple file uploads and jobs
Better handling for arrays of parameters in the backend, and support for multi-file uploads.
Make multipart form submissions optional.  Use URL Encoded by default unless we're uploading files.
Add our custom column types into AlterTableGenerator.
New migration file to create the import jobs tables
Add a first implementation of job creation
Added a sketch of a batch importer queue
Rename batch importer to batch import job queue to better reflect what it really does.
Add a batch import runner to convert and import queued jobs
Add some backend endpoint to access import jobs and add the new cancel_import_job permission
Deserialise filenames when returning jobs
Add import jobs link to the frontend navbar
Add job listing that hits the backend
Clean up temporary files after an import run
Clean up jobs frontend bits - listing and add basic show page
Store import output in a file
If there was an error during import, throw it
Add endpoints to get active or archived jobs. Display both as separate listings in the frontend