Revert ty_htable_add prepend behavior

New elements are prepended to existing elements on collisions, in O(1)
time.

Add ty_htable_insert to put new heads in specific positions.
Add ty_container_of macro

Replace ty_list_entry and ty_htable_entry thoughout the code.
cosmetic: Remove struct qualifier in cli/main.h
Rename TY_NORETURN to TY_FUNC_NORETURN
Change list API nomenclature to match Linux more closely
Move adjust_timeout to system.c and make it public API
Fix poll timeout behavior on UNIX with EINTR
Correctly break out of ty_htable_foreach
Improve process API

Move process stuff to process_* source files, and refactor the API
into 2 functions:
- ty_process_spawn to spawn a process and optionally get a pollable
descriptor on it
- ty_process_wait to get the return code from this descriptor

Since Linux (or POSIX for that matter) does not provide process
descriptors to poll on, process_unix.c implements an emulation layer
that depends upon the software calling ty_process_handle_sigchld
when receiving SIGCHLD.