tests: add benchmark for timeslice length

This patch adds a tests/misc-timeslice.cc, a simple benchmark running two
cpu-hog threads and seeing what time slice each one gets (i.e., how often
do we switch between the two threads).

The same test can run on both Linux and OSv, so we can use it to callibrate
our choice of thyst (or whatever other mechanism we'll use for controlling
the time slice).

Running this on my own Linux host, I see it is using a 10ms time slice.

When we run it on OSv, we see a 1ms time slice. Sadly, this has nothing to
do with our intentional choice of our scheduler (thyst is higher than 1ms).
Rather what causes switching every 1ms is the unrelated "page access scanner"
thread. This thread runs every 1ms for an extremely short duration, and when
it stops running, the scheduler again picks the thread with least runtime,
without letting the thread that was running earlier complete its time slice
(its thyst advantage was taken away from it when it stopped running for the
page access scanner).

If I disable the page access scanner, I see the average timeslice is 3.95ms,
which is thyst*2 (thyst=2_ms), as expected.

This benchmarks suggests we should:

1. change thyst from 2_ms to 5_ms, to callibrate the time slices of cpu hogs
   like Linux.

2. Rethink page access scanner's desire to run 1000 times a second. Why 1000?
   Alternatively, if we woke the scanner thread 1000 times a second but did
   *not* reschedule at that point, we could get it running 1000 times a second
   when there are already many context switches - but running fewer times
   when there are few context switches.

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