DB2 migration support

DB2 will not allow you to rename a table if it's got a
constraint on it (a unique or foreign key constraint).

This fix changes the migrations so that the unique or FK
constraints are dropped from tables before renaming and then
restoring the unique FK constraints. This works for DB2 and
other DBMSs that support FK constraints such as MySQL with
InnoDB and PostgreSQL.

Also, for DB2, give a name to the unique constraints so that
they can be manipulated.

Fixes bug 1188785

Change-Id: I7cf6ab42084e43d827ed827c64025e61e72a4672
Implement GET /role_assignment API call

Add support for the GET /role_assignment call as a first step
to making role_assignment a first class entity.

This patch also enables v3 collection filtering to match against
attributes of entities being returned in the list, using the same
dot notation (e.g. user.id) that we already support for policy file
checking against filters.

Limitations:

- The current implementation uses the standard v3 collections wrapper
  mechanism for filtering.  Given the potential numbers of role
  assignments in a large system, this may have performance and resource
  impacts.  A future improvement would pass the filters into the
  driver layer to keep the internal assignment processing to a minimum.

- The LDAP backend is not currently supported

Implements bp get-role-assignments

Change-Id: I6ff2ea780e39d7097a88214fbb3ddee1b924c30c
Work without admin_token_auth middleware

Requests would fail with a 500 Internal Server Error if the
admin_token_auth middleware was removed from the paste pipeline.
The requests would fail because the code assumed that the context
contained an 'is_admin' element, but that element was only in
the context if the admin_token_auth middleware was in the
pipeline.

This change makes it so that if the admin_token_auth middleware
isn't in the paste pipeline requests will not fail with a
500 Internal Server Error.

Change-Id: Ic064785226ee70ee475d8f72fea3c2ae6971a07f
Fixes: bug 1190708
Add callbacks for set_global_engine

This adds functionality where a class can monitor for the global
engine changing.

This is useful for a class that caches the global engine and
wants to know when its cached global engine isn't valid anymore.

Part of fix for bug 1179259

Change-Id: I5736a05308c63de9fccb8af7720ddd70530f4270
Remove an enumerate call

Refactor tests/test_backend.py, remove a useless enumerate call in for
loop.

Change-Id: I1268ce70d40994078343ec3120021c131e52713d
Fix issue with v3 tokens and group membership roles

The driver calls used by v3 token controllers to obtain roles
for a user on both project and domain were incorrectly implemented,
leading to roles being missed out of the token. v2 tokens are not
affected, since they don't use the same driver calls.

This fixes these functions and adds additonal tests to cover the
cases (all of which would fail without this patch).  As part of this
fix, the implementation of "get_roles_for_user_and_project() is
pulled up into the driver class (like the domain equivalent is already),
since, for all implementations, it is independant of backend technology.

Fixes bug 1197874

Change-Id: I59b6882d93bdc8372be03fed0b390b002a6d0320
Move comments in front of dependencies

Comments on a separate line can be preserved by a
requirements/update.py run.

Change-Id: Ie7c167eea59cf1293fbd4bf4b5e3e71864c080e3
Merge "Implement GET /role_assignment API call"
Merge "DB2 migration support"
Merge "Remove an enumerate call"
Imported Translations from Transifex

Change-Id: Id111bde13b52804813994a6a23f639fb1e959b9c
Merge "Fix issue with v3 tokens and group membership roles"
Merge "Imported Translations from Transifex"
Merge "Add callbacks for set_global_engine"
Merge "Work without admin_token_auth middleware"
Merge "Move comments in front of dependencies"