Throw 404 for non-existent org for bulk_process

Fixes #1682
[#1817] Upgrade SQLAlchemy to 0.9.x

No changes needed in the CKAN code base, but it requires changes on vdm,
see this branch:

https://github.com/okfn/vdm/tree/sqlalchemy-0.9-support

Also upgraded sqlalchemy-migrate.
Extend IDomainObjectModification

Currently the notify signal is sent before the database commit has occurred. It
is not possible to listen for modification events and know that the changes
have made it to the database. This can lead to a race condition if you try to
get a record from the database.

For an example see:

https://github.com/ckan/ckanext-archiver/issues/6

This extension of the interface would allow notification after the database
commit has occurred.
Merge branch 'master' into 1682-bulk-process
[#1682] Test that 404 is returned
[#1682] Fix pep8 issues
[#1879] Set DataStore to legacy mode when using PostgreSQL < 9.x

Up until now the user had to actively set legacy mode when running PG
8.x, and if not you could end up with the full datastore running on an
old postgres version. Features like the SQL search are not properly
supported on these versions, so we need to explicitly disable them when
running on PG 8.x, by setting `legacy_mode` to True.

The current behaviour is that legacy mode will be activated if
`ckan.datastore.read_url` is not present in the configuration and/or
postgres < 9.x.
[#1879] Fix tests

The travis setup explicitly removes the `ckan.datastore.read_url`
setting when running the tests, so we need to use a dummy one.

Also some refactoring
[#1871] Add function to extract table names from SQL statement

The function performs an EXPLAIN query with the provided statement and
parses its output looking for table names. It requires Postgres >= 9.x,
as it uses the FORMAT JSON option to get and parse a JSON objects.
 [#1871] Disallow DataStore SQL queries involving system tables

 Using the `get_table_names_from_sql` helper function before running the
 provided statement, we raise a Validation error if some of the tables
 start with `pg_`.
[#1871] Fix tests

PEP9 and skip the get table names tests if running on legacy mode.
[#1871] Fix wrong call in tests
[#1817] Update requirements file now that vdm is on pypi
[#1804] Add config tool.
[#1804] Config tool can uncomment commented options.
[#1804] Config tool used by Dockerfile.
[#1882] Fix org link in dataset page

Replaced use of `with` in the snippet.
Update related.py
Update test_related.py
[#1894] Fix convert_to_extras to allow use with normal extras

`convert_to_extras` was adding the custom fields in an unflattened way
during validation to the object that would be later unflattened. This
worked fine if there were only `convert_to_extras` fields, but not if
you were also providing actual extras, eg

    data_dict = {
        'name': 'test-dataset',
        'custom_text': 'Hi',
        'custom_text2': 'Hi2',
        'extras': [
            {'key': 'proper_extra', 'value': 'Bye'},
        ]

    }

This fixes the `convert_to_extras` output and adds new converters test for it.