Cleans up restartcore/smp_idle, fixes corner case

It was possible to have a proc's address space hang around on a core, if that
core was idle, then received a __startcore, followed quickly by __death, and
then was never used again.

This cleans up this situation (abandon_core() aggressively if there is no
owner), and cleans up proc_restartcore() and smp_idle() a little.
Adds a tracing facility for in-kernel events

Useful for debugging.  Check out k/i/trace.h for info and how to use it.
Adds a pcpui trace buffer for generic events

Users pick the next available type and provide a handler.  You can run
all the handlers or reset the trace ring from the kernel monitor (e.g.
trace pcpui, trace pcpui-reset).

All users should use the same access method (racy, no overwrite).  If
some subsystem uses overwrite, they'll end up starving the
non-overwriters.
Adds a KMSG tracer

This traces all kernel messages and MCP proc_yields (which affect the
local context much like a KMSG).  It's a non-overwrite, so you'll need
to reset the ring to get up-to-date results.

Default is off.
Fixes assembly input clobbers (XCC)

You can't list an input as a clobber, so to actually clobber it, you
need to use it as an output.  So we use a dummy variable, and hopefully
the compiler does the right thing.

Note we can't (or at least shouldn't) output to the same input variable
(using "+D"(a0), for instance).  We aren't actually outputting a valid
value for any variable; it's usually gibberish or 0, and we don't want
the compiler to *not* save and restore any input args that it may need in
the future.

Also note that these issues are just with the software contexts, where I
was trying to use the asm clobbers to mimic the amd64 calling
convention, so none of the HW TFs were affected.

Reinstall your cross compiler.