Add TestCase.stub_module to make stubbing modules easier
Add TestCase.stub_module to make stubbing modules easier

Previously various test cases would modify sys.modules directly,
duplicating code unnecessarily.

Change-Id: I09d333d6daf527e34db0262b28edcb0323cb2855

citrix-openstack-build/oslo.versionedobjects,openstack/oslo.versionedobjects