Add basic querying to MongoStorageEngine

Add the ability to do the most basic form of query with no filtering,
limiting, sorting or grouping.

Ensure datetime fields are converted to UTC.
Add ability to filter to MongoStorageEngine.query

Add the ability to filter by field and by start / end times.
Add sort and limit to MongoStorageEngine.query
Add group and period to MongoStorageEngine.query

This adds the group_by and period parameters. However, this does not
implement collect fields. That will come in a later commit.
Add collect fields to MongoStorageEngine.query

Add collect fields to grouped queries. This just adds the collecting of
the values, applying collect functions to these will be implemented
outside of the storage engine for the moment as it is currently done in
python.
Integrate mongo storage engine query

This is the smallest change I could figure out to integrate the mongo
storage engine's query.
Highlights:
- No response munging is done in the mongo layer now, it's done in
  NewDataSet
- A few functions about the query have been moved into properties on the
  Query object.
- None of the flask apps depend on DataSet or Database anymore
Move DataSet tests over to NewDataSet

Rewrite some tests on DataSet to the new class NewDataSet.
Change migrations to depend on MongoStorageEngine

This is a hack and migrations should be removed or fixed properly.

This change marks all existing migrations as deprecated as they don't
really make so much sense with the new model.
Remove backdrop.core.database and DataSet

This is quite a broad change that cleans up the previous commits. It
includes:

- Remove backdrop.core.database module, it is now completely
  superseded by backdrop.core.storage.mongo
- Remove DataSet class from backdrop.code.data_set, it is now completely
  superseded by NewDataSet (renaming will happen in a later commit)
- Remove query execution methods from Query object, they are now handled
  by NewDataSet. Moving query and response modules into core will happen
  in a later commit
- Raise a backdrop error when data set creation fails rather than
  bubbling up the mongo error
- Refactor storage engine tests so that they can be shared between
  multiple storage engines. They essentially become a suite of tests
  that verify a storage engine complies to the interface.
- Remove *loads* of database tests. There were a lot of duplicates,
  relevant ones were ported to either test_mongo.py or
  test_data_set_integration.py
Fix PEP8 issues
Correctly name data set variables

According to convention they should be `data_set` rather than `dataset`.
This may be reconsidered soon as this is a little klunky.
Make storage engine method names consistent

- If they are acting on a data set mention that in the name eg.
`empty_data_set`, `create_data_set`.
- Be explicit that save saves a record ie. `save_record`.
Fix mongo time query doctest

THe test was failing
Fix doctest running

Not providing the cover package apparently makes nose return with a zero
exit status but find no tests.
Rename NewDataSet.query to execute_query

It is a bit confusing to have a method called query that accepts an
object called query of type Query.
Rename storage engine query method to execute_query

So that it matches the same method in DataSet
Make mongo collection method more explicit

It was not clear that `_coll` meant a collection. Rename to
`_collection`.
Add docstring explaining use of the term 'spec'

PyMongo calls a query spec, it's weird, we should explain it.
Remove migrations

- They cannot run
- If we have a need for them in the future we should build them against
  the API.
Fix PEP8