Clean up tests/misc-mutex.cc

tests/misc-mutex.cc includes some mutex benchmarks and tests, but was
a big mess and this patch cleans some of the dead code, useless stuff,
and over-verbose output.

The test now includes 4 main parts:

* Measure the size in bytes of the mutual exclusion primitives, spinlock
  and mutex (this comes out to 1 byte and 40 bytes, respectively).

* Measure the single-CPU uncontended lock/unlock cycle, for both mutex
  and spinlock. On my machine this shows about 25ns, and 12ns, respectively.

* Measure the lock/unlock cycle when several threads in a tight loop
  requesting the same lock. We try 2 threads, 4 threads (on 4 cpus),
  and 20 threads on 4 cpus.
  Here the mutex is significantly slower than the spinlock, because the
  spinlock only context-switches when the thread's time slice is over,
  while the mutex context-switches on most lock/unlock cycles, as we
  sleep while waiting for another thread to release the lock.

* Additional correctness tests, less useful as benchmarks.

Reviewed-by: Dor Laor <dor@cloudius-systems.com>
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>