use POSIX realtime timers as tick source on Linux and FreeBSD, fallback to pthreads on other systems

init_timers() must be called as early as possible, before any os thread is created. It will mask the
realtime signal SIGRTMIN+9 on systems with posix realtime extensions.
The rt timer clock is set to CLOCK_MONOTONIC.

The pthreads fallback relies on pthread_cond_timedwait. Not all systems support pthread_condattr_setclock
for setting the pthread_cond_timedwait clock to CLOCK_MONOTONIC, so assume CLOCK_REALTIME is used.