bitops/log2/hashtable port from linux

Quick & dirty port.  hashtable.h is all I really wanted, but it needs
log2() which needs fls().
POSIX timer stubs, C libary wrappers

timer_*() functions from <time.h>.  Currently these return -ENOTSUP.
Use fls() to get pending signal number
Use bitops.h functions in signal.c
Initial (incomplete) POSIX timers implementation

timer_gettime() is still unimplemented, and only SIGEV_SIGNAL is
supported.
syscall handlers: return long

The return value of syscall handlers is stored in process->rc by the
dispatcher, so that handlers do not have to do this manually.  ISRs for
hardware interrupts are handled separately, since overwriting
process->rc would clobber %eax.
Less verbose copy_*_userspace() functions

These functions are renamed copy_*_user() and take struct pcb* arguments
instead of pmap_ts.  Also, copy_to_current() and copy_from_current() are
defined as macros that expand in the obvious way.
Separate ucontext and kcontext structures

It makes more sense to have separate structures for user- and
kernel-mode contexts.  struct ctxt was not used in a mode-agnostic way.
Automatically include <kernel/common.h>
Add bitops/hashtable macros to syntax file
Move signal.h definitions to kernel/signal.h

Kernel code shouldn't include libc header.
Add yet more POSIX constants to syntax file
Use absolute values for kernel timers

Also, timer_gettime().
POSIX timers: Allow SIGEV_NONE
Take arguments in ticks for sleep()/alarm()

libc can use __TICKS_PER_SEC to convert in user space.
Statically allocate sleep()/alarm() timers

POSIX does not allow either of these functions to return ENOMEM.
nanosleep()

Implemented through the normal sleep syscall.
RTC, system clock, time()

The RTC is read at boot to set the system clock (seconds since the
Epoch).  It is incremented every __TICKS_PER_SEC ticks.  This causes
a ridiculous amount of drift in QEMU.  I'm unsure if this is bad
emulation or an error on my part.

The POSIX time() and gmtime() functions are defined, including the
SYS_TIME syscall to get the value of the system clock.