AssertEquals is deprecated, use assertEqual partI

assertEquals is deprecated in Python 2.7, need drop it.
http://docs.python.org/2/library/unittest.html#deprecated-aliases

Change-Id: Ieec505887f740b99b11ef40878ba3ee7247b78a8
Closes-Bug: #1285040
Only fetch a timestamp when needed

While it seems free to just call time.time() whenever it is
convenient, in many cases code has to decide on a particular timestamp
as a reference point for decisions. In other places, it just seems
like a waste to make two calls that one would assume would return
nearly identical times; however, certain test environments are
notoriously overloaded (which is arguably a good thing, added stress
to the code) where back-to-back calls to time.time() might produce
timestamps seconds or even minutes apart.

These simple changes here pick a point of reference for the operation
to use throughout.

Change-Id: Id2c0ffcc7f4ffafff61ebf59a8baeb079fd0c2b8
Merge "AssertEquals is deprecated, use assertEqual partI"