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 "Directly verifying that time and socket are monkey patched" into milestone-proposed
Merge "Fix domain database initialization" into milestone-proposed