Check if creds are present and not None

Currently, KeystoneStrategy checks whether the required credentials are
present in the creds dict but it doesn't check whether they are valid or
not.

This patch checks whether the required creds are present and not None
otherwise a MissingCredentials exception will be raised.

Note: No need for checking parameters' values types since they'll be
instances of basestring once set otherwise they'll be None.

Fixes bug 1157765

Change-Id: I664a604c3cbf2fca60a88c4d887cd9a4b678c8a5
(cherry picked from commit 855162b0b1fc62b60f0f350d3258334711e12aec)
Fallback to inferring image_members unique constraint name

Fixes bug 1160114

The initial version of the 022_image_member_index migration
hardcoded the default naming convention for unqiue constraints
used by PostgreSQL 9.2, which turns out to different to the
convention used by PostgreSQL 8.4. This causes the CI to fail
(non-voting) against RHEL.

We resolve the issue by falling back to inferring the existing
unique constraint name from the image_members indices.

Change-Id: Iad6db033e63cdfd7a77db44bdeaed2284699b469
Directly verifying that time and socket are monkey patched

This tests makes sure that thew wsgi object properly monkey patched
two needed modules, socket and time.  In bug 988099 it was noted that
the time module was not being monkey patched.  A test was added that
unfortunately introduced a bug and a patch to revert it is here:
https://review.openstack.org/#/c/25107/ in order to fix bug 1158247.
This patch allows for test_server_monkey_patch.py to be removed
without losing the verification of that functionality.

Fixes bug 1158247
Change-Id: I8da6b04d0cc0dae00ba52e5b7350a5e01a76cadb
Fix domain database initialization

To fix bug 1089916, calls to db_api.configure_db() were changed to
setup_db_env(). However, the gateway domain initialization didn't get
the memo. This patch makes sure setup_db_env() is called in all the
relevant places.

Fixes bug 1131705.

Change-Id: Ieec141192b8a5a045dadba6d70abaa25748b85b2
Merge "Fallback to inferring image_members unique constraint name" into milestone-proposed
Merge "Directly verifying that time and socket are monkey patched" into milestone-proposed
Merge "Fix domain database initialization" into milestone-proposed
Don't access the net while building docs

(Note this hasn't been submitted upstream)

Change-Id: I42c6e3a5062db209a0abe00cebc04d383c79cbcb
(cherry picked from commit f2b4bb4e45afcc178200966193a7b87401c534d7)
remove deprecated assert_unicode sqlalchemy attribute

Removing this enables use with sqlalchemy 0.8.0
The deprecation is described upstream at:
http://docs.sqlalchemy.org/en/latest/changelog/changelog_08.html#change-ad44af79c886d1bb283042deb64f9cbe

Change-Id: Ia34b38245c6abe1ddb4162eee89459a7130deacb