Move timer code to timer_* source files
Move POSIX stuff from *_unix.c to *_posix.c
get_basename (system_posix.c) should have been static
Add missing const qualifier to many functions (getters)
Rename ty_list_empty to ty_list_is_empty
Add ty_list_is_singular
Don't reset the board drop timer blindly

When there are missing boards already, respect their drop timeout
when another board is removed too.
Add compat memrchr implementation
Reorder some stuff in CMakeLists.txt
Detect fstatat in CMakeLists.txt

We can't simply presume all POSIX platforms have it, it's
fairly recent. Mac OS X only got it in 10.10.
Detect m_tim/m_timespec in struct stat in CMakeLists.txt

st_mtime may be defined to something other than st_mtim.tv_sec
so "#ifdef st_mtime" does not imply st_mtim exists.

Mac OS X has st_mtimespec instead.
Add missing header signal.h in process_posix.c

Remove it from system_posix.c in the process.
Remove weird assertions in the middle of process_posix.c

For all its benefits, Focus-Follows-Mouse's biggest downside may be the
occasional copy/paste mistake, espacially when its triggers no compilation
error.

But in this case, it was harmless.
Test for pipe2, don't presume everyone has it

Not all POSIX systems are created equal. In this case, Mac OS X does not have
pipe2. Hello, racy pipe + FD_CLOEXEC code :)
Use F_SETNOSIGPIPE for pseudo-process descriptors (self-pipes) on Mac OS X

Signal masking + sigtimedwait is used to avoid pipe write errors in the
process descriptor emulation layer, in case the client closes the read
side.

Mac OS X does not have sigtimedwait, but fortunately it has F_SETNOSIGPIPE.
Fix potential race between Win32's timer callback and set/rearm functions
Change timer API to remove separate value and period.

Instead, ty_timer_set takes one value and an optional flag, TY_TIMER_ONESHOT.
This reduces functionality but makes it easier to implement on Mac OS X:
- which does not even have POSIX timers
- but has kqueue to make up for it
Add ty_millis implementation for Mac OS X

clock_gettime does not exist on Mac OS X, but one can use mach_absolute_time()
to get a monotonic clock.
Detect __APPLE__ in addition to __unix__

__unix__ is not defined on Mac OS X. Makes sense given the variety of missing
stuff :)
Add timer implementation using kqueue

This is primarily for Mac OS X but BSDs can use the same code later on. Also,
it's barely tested code.