Cleanup revocation query

The code in the revoke sql backend to calculate the query for the
list of events was creating a temporary and then discarding it,
and blaming not using it on sqlite.

Rather than discard the temporary, a reference is kept to it so
that it can be used.

Change-Id: Ifdb6a70900af85869b43d319eab8aa2a6b2bc162
Remove unnecessary test setUps

There is no reason to have a setUp case if all we do is chain to the
parent.

Change-Id: Id31281a9d50588f036e03b458ccfb71d1010f2d6
Properly handle unicode & utf-8 in LDAP

This patch adds all the necessary type conversions between the LDAP
API's.

* string literals are unicode

* unicode strings are utf-8 encoded before calling LDAP

* utf-8 strings received from the LDAP API are decoded into unicode

* string classes use the six.text_type for Python 2 vs. Python 3
  compatibility

* the fake LDAP implementation was reworked such that it's external
  API only handles UTF-8 encoded strings but only uses unicode
  internally. This is because internally it must be able to operate on
  logical characters in order to perform string operations on it's
  data. This is very much akin to what happens in a real LDAP
  implementation, the interface is UTF-8 but operations occur on
  decoded logical characters.

Unicode tests that were skipped are now re-enabled.

Partial-Bug: 1172106
Change-Id: Icce6b508f748214e241de40c3c9389b2caccea83
Expand the use of non-ascii values in ldap test

Very few of the ldap tests were using non-ascii values, in fact
non-ascii values were restricted to only specific tests that
had 'unicode' in their test name. This is very weak test coverage.

This patch replaces all occurances of 'fake1', the standard string
used in the tests for test value with 'fäké1' where the a has an
umlaut and the e has a diacritical. Visually they look almost the
same but will trigger the type of encoding exceptions we've seen
in the past.

Closes-Bug: 1172106

Change-Id: I03b10f3da93a8fb388baacb00532c03019f327c0
Check domain_id with equality in assignment kvs

It was noticed in https://review.openstack.org/70816 that the kvs
assignment backend was using a contains check instead of an equality
check which comparing domain_ids.

Change-Id: Ib1b51298c8171151844caaa5ab694117e68374e7
Cleanup ldap tests (mox and reset values)

When running concurrent test workers, the structure used to test
the instantiation of the FakeLdap handler was relying on mox. In
some cases the test structures were not reset during teardown.

The test cases were not clearing out the _HANDLERS in the common
ldap module. This has been corrected with an addCleanup and moving
the setUp logic to the BaseLDAPIdentity class instead of the
LDAPIdentity class.

Change-Id: I2976774dabeb2b9196b3f25c02838bf4c4688d94
Merge "Cleanup revocation query"
Merge "Remove unnecessary test setUps"
Merge "Properly handle unicode & utf-8 in LDAP"
Merge "Expand the use of non-ascii values in ldap test"
Merge "Check domain_id with equality in assignment kvs"
Merge "Cleanup ldap tests (mox and reset values)"