[1541] Add empty alt tag to gravatar
[#1539] Create a minimal new Trash page
[#1659] remove new_package_form.html block overrides
[#1664] package_create+update: fix config permission check

Use the same permission checks for both package_update and package_create
and check all the applicable config options: anon_create_dataset,
create_unowned_dataset and create_dataset_if_not_in_organization
Catch exception in DataPusher

Fixes #1666
Catch NotFound error in resources page
[#1659] two-stage package/snippets/stages.html
[#1659] two-stage create package controller
[#1659] remove package create step 3 templates
[#1659] move Finish button to resource form
[#1668] Show only active users on cli
[#1686] Document no ORM objects in templates
[#1725] Add tests for when searching/deleting elements passing invalid filters
[#1725] Adds IDataStore interface and extension point to change WHERE clauses

I prefered to extend on `where` instead of `search_data` and `delete_data`
separately to keep the extension code DRY.

The IDataStore extensions' `where` methods are called with the `filters` dict
received from the user. They must check if there's any filter they want to
process and create a `clause` list with elements as tuples following the
pattern:

    (SQL_CLAUSE, PARAM1, PARAM2, ...)

The SQL_CLAUSE can be anything valid on the WHERE clause, for example
`AVG(score) > %s AND AVG(score) < %s`. You have to substitute any user-defined
parameters for `%s`, doesn't matter what their type is (int, string, ...).
Then, for each `%s` inside SQL_CLAUSE, you need to add one PARAM. For example:

    ('AVG(score) > %s AND AVG(score) < %s', 10, 20)

This pattern is needed to be able to sanitize user input and avoid SQL
Injections.

After that, you'll need to delete every key from the `filters` dict that you've
processed. Following our example, you'll have to:

    del filters['score_between']

We need this because we validate the filters' column names against the
DataStore resource's column names. Any filter on a column that doesn't exist on
the resource is invalid and raises an error. If you didn't remove
`filters['score_between']`, you'll receive a "Field 'score_between' doesn't
exist" error.

This is done to give the user a friendlier error message, and avoid another
possible SQL Injection vector.
[#1725] Forgot to import ckan.plugins
[#1725] Custom filters should be added inside parenthesis

The extensions can get a single filter (e.g. "age_not_between") and create two
WHERE clauses (e.g. "age < %s OR age > %s"). To avoid hard-to-track bugs
related to the operator precedence in Postgres, we add every custom filter
inside parenthesis.
[#1725] Filters received shouldn't be modified

This means that if the user sends us:

    'filters': { 'age_between': [20, 30] }

We should return that unmodified in the query result, even though internally
that might be translated to something else or removed.
[#1725] Guarantee that tests fail for the correct reason
[#1725] Add test to guarantee that every field in datastore_search is valid
[#1725] Fix exception caught when there's no CKAN_CURRENT_URL

When we try to get a key from a dict and it doesn't exist, a KeyError is
raised, not a TypeError.