mock-unit-tests improvements

This commit introduces multiple fixes in the unit tests to allow for
integration with the new confmon system and subsequent changes.
Particularly this improves on:

- Not assuming specific timeout handling. This is done by avoiding
  manual sleeps and scheduling specific time-sensitive events via
  timers.

- Allowing more accurate testing of server topologies. This involves
  disabling replicas for specific tests, and also ensuring the mock is
  stopped in order to simulate network error conditions

Change-Id: Ife63f2d7ddd82bea46f4ac4739ce2b3e14c30f41
Reviewed-on: http://review.couchbase.org/31822
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Better and more accurate timeout handling.

This patch attempts to provide more accuracy for timeouts, so that
commands are expired when their lifetime has reached; no sooner and no
later within a resolution of microseconds

Change-Id: Ib4fd47e65f9ed7614689fd3c5c86096b754c437a
Reviewed-on: http://review.couchbase.org/31755
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>