Allow the DataStore to be extended

An extension should be able to tweak DataStore queries. The current use case is to allow spatial queries with PostGIS, but this could be useful in other cases as well.

The draft spec is at https://github.com/ckan/ckan/wiki/Spec-%5BWIP%5D:-Extending-the-DataStore
It's when during testing there's the `toolkit.request.environ` is not set yet.