refactor templates data handling and http apart.
Introduce a download path into the pipeline.

This will generate a csv for download in the background. users will poll
a status URL to see if it's ready.
Implement filled measurements for downloads.
wire up route with pipeline for csv download.
add some tests.

Stepping through the sequence of sequence of measurements is complicated
code. these tests do some validation on simple input data and also does
a generated test to make sure that no input breaks the code at
least. The generated test doesn't validate the output, thats for another day.
http wiring, date handling.
fix failing test.
fix data format PEBCAK.
tidy up (fix) upload to S3.
fix uris
fix s3 key for downloads.
remove redundant code.
refactor for debugging.

getting wierd error - try this to track it down.
more robust reporting after error.
@otfrom rubber duckie - you're the one.
fix generation of large numbers of measurements.

Continues the previous commit to Work around lazyness vs loop/recur.
Temporarily disable data quality tests.

Because we've complected data generation and writing to file to make it
work without SO the data quality tests are disabled for now.

The 'is there an input that makes it fail' test.check stuff is still in.
Merge pull request #98 from MastodonC/feature/csv-template-download-with-data

csv template download with data.
wip: multiple sensors are stored in cursor
Bug in deselection. And history seems to
store first selected sensor twice (something unselects the sensor on the UI)
wip: still bug in selecting sensors.
Something is resetting the state but not the history.