Convenience attr constructor for a thread with a small stack

Our sched::thread makes it rather difficult to create threads with
non-default attributes. This patch makes it easier to create a thread
with a non-default stack size, e.g., a light thread with a one-page stack:

   sched::thread a([&] { func(); }, sched::thread::attr(4096))

We should probably overhaul the sched::thread constructors at some
point to make it easier to specify options, but for now, this
specific constructor is convenient for my uses.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Add timerfd_*() system calls

This patch implements the Linux's timerfd_*() system calls, declared in
<sys/timerfd.h>. These define a file descriptor, usable for read() or
poll() and friends, which becomes readable when a timer expires.

This aspires to be a full implementation of timerfd, with all the intricate
details explained in timerfd_create(2).

timerfd was added to Linux five years ago (Linux 2.6.25). Boost's asio,
in particular, uses this feature if it thinks it is available.

Fixes #129.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
tst-timerfd.cc: Test for timerfd_*()

This test includes a large number of tests for the timerfd_*() functions
and many of their bizarre use-cases and corner cases.

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