Move like unit tests together; add comments

Some simple code movement to move the utils.ratelimit_sleep() unit
tests together so that they can be viewed all at once.

We also add some comments to document the behavior of
utils.ratelimit_sleep(); small modification to max_rate parameter
checking to match intended use.

Change-Id: I3b11acfb6634d16a4b3594dba8dbc7a2d3ee8d1a
Mock out time and sleep to avoid races

We mock out time.time(), time.sleep() and eventlet.sleep() so that we
avoid test problems caused by exceedingly long delays during the
execution of the test.

We also make sure to convert the units used in the tests to
milliseconds for a bit more clarity.

Closes bug: 1298154

Change-Id: I803d06cbf205a02a4f7bb1e0c467d276632cd6a3
Merge "Move like unit tests together; add comments"
Merge "Mock out time and sleep to avoid races"