ipc: remove calls to thread_get_utcb(), change set_ipc_return_thread() contract

These two changes are somewhat unrelated.

The first replaces many, many redundant calls to thread_get_utcb() with
parameter passing and better structuring of the relevant code. These changes
affect only the main sys_ipc(), kipc(), etc. paths; typed transfers,
resumption, cancellation, and that lot are largely unaffected (for now).

The second moves the IS_KERNEL_THREAD() check out to the only callsite to
set_ipc_return_thread() that's affected, which is in the active success path
of ipc_send_half(). Others have an assert to the contrary, with justification,
before the call.
exception: clean up kthread handling

Their impact should be minimal. In the #GP handler, an "unlikely" clause is
just that.
reduce the number of kernel threads to 2

The boot (scheduler) thread, sigma0's pager thread. The latter could exit once
there's nothing further to do, but... whatever.
thread: remove thread_get_{pager,exnh}()
thread: clean up debug prints

This series of changesets is in preparation for separating the kernel
threads mechanism from the microkernel's actual business, i.e. ThreadControl
and ExchangeRegisters.
move kernel thread interface into kth.c, <ukernel/kth.h>

It's a very simple interface, and rarely used. Bits of it were scattered
between thread.c, sched.c, and their respective module headers.

This changeset also removes the phantom thread_list, referenced from sched.c
without a header declaration.

Next up: move kthread IPC bits into kth.c as well.
thread: remove thread_set_space()

Verdict: too wack to keep.
kmain: clean up debug prints, unused code

For instance the "second-level call returns to" message? It's never been
particularly useful. And I can't even remember when something had last used
list_length(), which is likely why it was #if 0'd out in the first place.

Likewise for the GDT descriptor dump.
kth: review & cleanup changeset
mapdb: clean up unused code
ipc: cleanups, move init_ipc() towards start of module

There's plenty of #if 0'd segments left in due to the incomplete nature of
string transfers, especially in the face of pagefault handling and xfer
timeouts. Those should be tested for and implemented; after that, the debugs
come out.

Also, an assert in ipc() against @utcb was changed to a NULL comparison,
because once address space recycling is implemented, getting the value of an
UTCB pointer may cause that pointer to come into existence. At that point UTCB
validity should be tested with a minimally invasive IS_UTCB_VALID() macro
instead.
ipc: add accessor to ipc_state->{from,to} for Schedule
sched: recognize nonexistent threads in Schedule

And return L4_SCHEDRESULT_DEAD for them, as is proper. This changeset's effect
has no test.
sched: return tstate={sending,receiving} from Schedule

Fewer prints, too.
sched: use BUG_ON() in sq_insert_thread()

And remove a long-disused TRACE(). It's not as though TRID_SCHED didn't spew
enough useless crap already.