libc: support more time modes

We are currently only answering requests for CLOCK_REALTIME, but we could
easily handle:

    * CLOCK_REALTIME_COARSE, which is effective the same as CLOCK_REALTIME
      but faster. In our case, all time sources are equally fast
    * CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID, since we can
      easily get runtimes for our threads and publish that.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
tests: add test for thread clock

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>