Move signal handling to libuv event loop

This removes all signal handling code from os_unix.c to os/signal.c. Now signal
handling is done like this:

- Watchers for signals are registered with libuv default event loop
- `event_poll` continuously calls `poll_uv_loop` to produce events until it
  receives user input, SIGINT or a timeout
- Any signals received in `poll_uv_loop` will push events to a queue that is
  drained and processed by `event_poll`

Signals aren't handled directly in the libuv callback to avoid recursion in the
event loop(which isn't supported by libuv).

The same principle will apply to other events in the future: Push to a queue
from a libuv callback and drain it from `event_poll`
Make FPC_* defines an enum type in path.h.
Add os_stat to os/fs module.
Refactor fullpathcmp.
Add unit tests for gettail.
Refactor gettail.
Move gettail_dir more closely to its usage.
Add unit tests for gettail_sep.
Refactor gettail_sep.
Add unit tests for getnextcomp.
Adapt getnextcomp to coding style.
Rename fullpathcmp to path_full_compare.
Rename gettail_sep to path_tail_with_seperator.
Rename gettail to path_tail.
Rename getnextcomp to path_next_component.
Fix seperator->separator, path_tail_with_separator->path_tail_with_sep.
Initialize on declaration; use postincrements.
Rename FPC_* constants.