Add rate transform

I have ported over the completion rate parsing from Spotlight that can
be found here:

https://github.com/alphagov/spotlight/blob/9f073c6fa97118b1e5bc669807673bb0fbfa0e5b/app/common/collections/completion_rate.js
Merge pull request #383 from alphagov/feature/rate-transform

Add completion rate transform task
Update performanceplatform-client dependency
Merge pull request #384 from alphagov/update-perfplat-client

Update performanceplatform-client dependency
Add task for calculating user satisfaction
Pass date range of writes to transforms

In order for a transform to request the data that it is going to operate
over we need to know the data bounds.

This is fed through to the transform that will then handle the retrieval
of data.

All data written into the platform is required to have _timestamp so our
feature tests should reflect this. The feature tests now receive the standard
schema that any dataset will be sent by stagecraft.
Get transforms and spin off a task for each

This commit moves the tasks module to dispatch as it was clashing with
that tasks namespace.

We want to get all transforms that need running for this data set and
spin them out to a new task that will grab the data, run the transform
and write the new data.
Worker should get data set config once

We need to use the data set config in transforms and this will be the
same for the N sub tasks that are dispatched, so we should get it in the
entrypoint function.
Bump version of client

We need the ability to get data with query parameters that this version
introduces.
Request data using transform configuration

We want to use the data set configuration and the query parameters
associated with the transform to request data to be transformed. We want
to set the start_at and end_at parameters using the bounding dates of
the data we want to transform so that we only work on the data that has
been changed. We make flatten explicit as we always want to be working
with this type of groupped data and it is still not the default.
Call transform function

We get provided a namespace to the function from the transform
configuration passed back from stagecraft. We use this namespace to find
a function to call, passing through the data and options to get back
transformed data.
Merge pull request #385 from alphagov/user-satisfaction-task

Add task for calculating user satisfaction
Required fields for transforms (_id, _timestamp)

Backdrop requires that incoming data points should have a _timestamp and
an _id will be generated if there isn't one. Given that we want to the
transforms to be idempotent and the transforms know about the data that
is going to be submitted I have moved _id generation into them.

_timestamp is set to the start of the period in both cases, which
reflects how the front end considers the _start_at field (as a synonym
for _timestamp)
Merge pull request #387 from alphagov/feature/required-fields-for-transforms

Required fields for transforms (_id, _timestamp)
Write transformed data out to data set

The data group of the data set written to will either be defined by the
transform or will be inferred by the data group of the inputted data
set.
Refactor run_transform function

There was a lot of code in this function so I tried to break it up into
more meaningful blocks of functionality.
Format earliest and latest as ISO8601

These objects, as passed through from the write api, are always datetime
instances. We should convert these using isoformat to something that
backdrop understands. Previously without this conversion they would be
outputted using the default python date format NOT ISO8601
Merge pull request #386 from alphagov/feature/data-for-transforms

Feature/data for transforms
Add endpoint for invoking dataset transforms

This is required for migrating existing calculations and testing.
Merge pull request #388 from alphagov/transforms-endpoint

Add endpoint for invoking dataset transforms