Fix content negotiation

The original implementation of content negotiation tried to determine the
transformer too early in the process -- we could make a decision about the
requested content type, but couldn't turn that into a suitable transformer
class, because it hadn't been set by the downstream app code.

Moving the decision into the start_response call means that we've already
run the app code when we get to it, so we should have a "transformers"
dictionary to look in by that point.

Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
Add the concept of a default transformation

If we can't find a transformer based on the request type, we should be
able to specify a default transformer. Add this capability.

Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
Add a CSV target for content negotiation

Content negotiation transformer for turning an array of arrays into a CSV
table.

Signed-off-by: Hugo Mills <h.r.mills@reading.ac.uk>
Enhanced options for the test-runner script

If we supply a module name to the test script, run just the tests for
that module. Also, pass additional parameters through to the test runner,
for (e.g.) adding -v options.

Signed-off-by: Hugo Mills <h.r.mills@reading.ac.uk>
Remove spurious debugging/log messages

Signed-off-by: Hugo Mills <h.r.mills@reading.ac.uk>
Add selection of data files by use of a file extension

Providing ?type=foo is OK, but we can also consider providing a .foo
file extension on the request -- implement this.

Signed-off-by: Hugo Mills <h.r.mills@reading.ac.uk>
Update default behaviour of series import script

Change the default port and CSV/TSV dialect for bulk-importing series
metadata

Signed-off-by: Hugo Mills <h.r.mills@reading.ac.uk>
Fix bug in data import script

result.json() is a function, not a property. Fix this.

Signed-off-by: Hugo Mills <h.r.mills@reading.ac.uk>
Add incremental option to bulk data import script

Signed-off-by: Hugo Mills <h.r.mills@reading.ac.uk>