close db migration session

Explicitly close sessions in db migration 022. With the postgresql backend
if the session is not closed explicitly it leaves a user of the db behind
which can cause problems later on

Fixes bug #1158544

Change-Id: I389b83397addc5901aa94b584856fbd7f5cef485
don't migrate as often

saves a bunch of time in the tests (the savings are more noticable
if you are not running the integration tests)

before:

Slowest 5 tests took 5.80 secs:
    1.53    TokenExpirationTest.test_maintain_uuid_token_expiration
    1.22    TestTokenRevoking.test_deleting_group_grant_revokes_tokens
    1.08    TestTokenRevoking.test_group_membership_changes_revokes_token
    1.06    IdentityTestCase.test_crud_group_domain_role_grants
    0.92    CatalogTestCase.test_create_endpoint_on_v2
----------------------------------------------------------------------
Ran 1274 tests in 149.136s

OK (SKIP=84)

after:

Slowest 5 tests took 4.82 secs:
    1.53    TokenExpirationTest.test_maintain_uuid_token_expiration
    0.90    TestTokenRevoking.test_deleting_group_grant_revokes_tokens
    0.84    TestTokenRevoking.test_group_membership_changes_revokes_token
    0.78    Kc11TestCase.test_token_expiry_maintained
    0.77    TestTokenRevoking.test_deleting_user_grant_revokes_token
----------------------------------------------------------------------
Ran 1274 tests in 102.986s

OK (SKIP=84)

Change-Id: I1f39ad0412e739a333e4b755ca00a94ccbf400be
fix undefined variable

An undefined variable was used in the trust kvs backend, this
fixes it.

Change-Id: I9c25d85ab64afa2bf7639d3fd14a4d6839dacb64
test duplicate name

the test_list_trust_by_trustee method in test_backend is
duplicated. One of them should be test_list_trust_by_trustor.

The original test_list_trust_by_trustee that wasn't run before
had a couple of problems so fixed those, too.

Change-Id: I14759c83c5d4b7387e5d760d8418b889c4522c21
Set empty element to ""

When serializer xml formatter response need set empty element to "" to
align with JSON formatter.

Fix bug 1168317

Change-Id: I4985791095f43eac88fe42ec16f6a78bbf77ec07
fix duplicate option error

when using ./run_tests.sh with -xintegration this test fails
with a duplicate option error, we shouldn't be running it there

Change-Id: Idb0f7608bbefd2975958ae30977e9a4d5debfc1f
Merge "test duplicate name"
Merge "don't migrate as often"
Merge "Set empty element to """
Merge "close db migration session"
Merge "fix undefined variable"
Merge "fix duplicate option error"