[#1512] Fix select2 files on 2.2.1

Due to cheery-picking #1512 commits without merging #1278 first, the
source files for select2 where incorrect on the 2.2.1 branch (js error
on /dataset/new when running on debug mode). select2 files are now in
sync with master.
[#1791] Keep filters when ordering dataset listings

There is a `form.hidden_from_list` macro call in the
`search_form.html` snippet that did not get the `fields` variable it needed
to create the necessary hidden inputs.
[#1767] Fix bug with send_email_notifications not working with paster

The problem is that our validators notice that .send_email_notifications()
didn't call its auth functions and raise an Exception. But it shouldn't call
it's auth functions when being called with paster anyway, so it's correct.

This fixes that.
Use assert_raises instead of the full nose.tools.assert_raises
[#1729] Fix insecure content warning in recline map
[#1721] log the user in programmatically after registration

Conflicts:
	ckan/controllers/user.py
[#1721] pep8
[#1721] leave username as unicode string

Fix so old user tests pass, not that we allow unicode usernames anyway
[#1580] Don't display private datasets on autocomplete

Conflicts:
	ckan/logic/action/get.py
	ckan/new_tests/logic/action/test_get.py
[#1580] Fix Pep8
[#1723] Do not show create fields in member edit
[#1420] Fix group_show by taking schema out of the context when making sub-calls.
Add quotes to package ID and name in Solr queries to prevent Solr errors with custom dataset identifiers.
[#1776] Fix bug when upserting [] on JSON column in the datastore

We were testing that the new value wasn't `None` using `if value`. As `[]` is a
falsy value, we never went through that `if` and ended up trying to run an
invalid SQL query.

This commit fixes that by explictly testing `if value is not None`.

This was first discovered in
http://stackoverflow.com/questions/24207065/inserting-empty-arrays-in-json-type-fields-in-datastore
[#1701] Move and clean up search index tests
[#1701] Add tests for date fields, including a failing one for #1701
[#1701] Don't index empty dates as the current one

When parsing an empty string, dateutil will always use a default one,
which by default is now(). We use here a fake date to see if that was
the case, and if so remove the value from the dict to index.
[#1436] Fix encoding error on user form when using email notifications

If the site title had special characters an encoding error was raised,
as the site title was an unicode string but the helper text wasn't. We
used the Jinja2 "string" filter to fix this. Translations should not be
affected so this can be backported.
[#1714] do not remove session when get_site_user is called

See #1714 for all details. This commit includes only the parts relevant
to 2.2.1.
Remove test included in #1580 that can't be run on this branch

We don't have the Dataset factory