Merge pull request #13 from mgorny/tests-sort-results

Fix tests not to rely on returned object order.
Support calling build_rdn() and build_dn() on a class.

This makes it possible to obtain the DN for an LDAP object without
having to fetch from LDAP first.
Wrap up connection obtaining code in _get_connection().
Support binding to a different database alias using bind_as().
Support restoring settings.DATABASES after bind_as().
Add a context manager interface for bind_as() + restore_alias().