Adds test condition in test_periodic
Adds test condition in test_periodic

There was no test case that covers a periodic_task not being called
without "run_immediately" set. This patch also mocks time.time() due
to the time gap between when the sciprts are loaded and when the tests
are actually executed.

Merged test_is_called and test_called_twice since the two cases overlap.

Change-Id: I3385c8d313d58cbaad5c21347b2b7ce4a8aae6a7
Related-Bug: #1275151
Related-Bug: #1275152

citrix-openstack-build/oslo.service,eezhova/oslo.service,poznyakandrey/oslo.service,openstack/oslo.service