User mode exception handling API

Exception handling is built on top of the user mode interrupt system,
handler functions can be registered to handle exceptions. There are
process-wide and per-thread handler tables. If a per-thread handler is
set it will be used, otherwise the per-process handler is used. If no
handler is set either in either table, the process will be killed.