Merge branch 'development' of https://github.com/sanger/s2_extraction_pipeline into development
Implemented Promise Tracker

Promise Tracker will track the number of thens called once an
initial promise has been returned. It also provides beforeThen
 and afterThen callbacks.

Scan Barcode controller also has access to a progress bar
Improved promise tracker

- Promise tracker now doesn't overwrite original promise, creates a new
one
- Promise tracking added to kit, select, and default controllers
Removed unnecessary function from labware_controller.
Changed use of typeof undefined to Underscore equivalent
Remove references to findByBarcode et al
Fixed drop zone so that you can re-click
Massive refactor of sample manifest reception.

The issue originally started that all of the samples in a manifest were
then requested in parallel, which for a 3000 entry manifest caused pain.
This was an attempt to restructure the code in such a way to make that
far more friendly, but degenerated into fixing no end of bugs & issues.

Collect errors per tube.
Collect errors globally for missing tubes.
Global functions to deal with the various stages of processing.
Permit manifest upload even if there are errors, with a warning.
Hide controls in the face of success.
Display & check gender, hide order choice.
Detail with pages of tubes sequentially.

Process each tube on a page sequentially.
Process each page of tubes in parallel.
Wrote an _.regardless function that is $.when but right.
Refactored manifest template handling code

Move CGAP specific template info into separate file.
Dynamically load templates.
Build JsonTemplater.applicator instances once per template.
Drop the combinedData which can be retrieved from manifest structure.
Enable custom validations per manifest template.

Moved all of the template information into the manifest structure.
Fixed a bug: if the template didn't exist it would blow up!
Fixed a bug: if the column headers were incorrect it didn't fail!
Added custom validation callback to templates.
Handle non-CSV file uploads.

Fixed a bug: rejection of deferred wasn't manifest but model.
Ensure that manifest errors are not overwritten by messages.
If the file looks invalid UTF-8 at the start then assume Excel.
Use development branch of S2Mapper
Remove unused jquery-ui references
Remove app/scripts/vendor and unused dependcies
Remove jquery.csv as I don't think it's in use.
Remove FileSave global references
Remove global jquery and underscore
Moved jquery and underscore into main; still global for now
Handle different types of manifest

Changed 'tubes' for 'details', because it's really sample level.
Added 'model' which comes from the template.
Changed variable name 'tube' for 'resource'.
Changed variable name 'tubeDetails' for 'details'.
Use specialised extractor to get a receptacle of samples.
Group details based on barcode.
Treat group as group of promises that need updating.