add kernel self-test support, basic test in kth.c

This changeset modifies testbench's tap.c so that it can be compiled with the
kernel's header to validate its prototypes the way the kernel sees them. The
testbench Makefile was changed to strip __KERNEL__ from CFLAGS, so that tap.c
can recognize how it's being compiled and drop _fail_unless() accordingly,
since it refers the testbench-exclusive flush_log().

When self-tests are enabled, testbench will do the invocation dance with
sigma0's pager with

    $ TESTBENCH_OPTS="ktest=1" ./run.sh -display none

as expected. No support for running the tests through the reporting script,
however, that's the very next thing.
ktest: add describe support via testbench, add report.pl parameter

To run the in-kernel unit tests, use

    $ KTEST=1 user/testbench/report.pl

Or run the ordinary Makefile's check or qcheck target. It performs kernel
tests first, and runs testbench later.
ktest: reset TAP state between tests

Also disable __KERNEL__ from sigma0 & mbiloader Makefiles.
lib: add tests for slab.c

And Makefile support for compiling them. Under lib/, tests are placed in
separate source files named t_<name_of_module>.c and compiled automagically to
avoid requiring ktest function presence in mbiloader and sigma0.
lib: add object caching, ctor/dtor calling to slab.c

There's no test for the "don't call ctor again for recycled objects" feature.
That is up next.
lib: add test for slab allocation recycling

Seems to work as predicted.
lib: add more slab tests, permit NULL to kmem_cache_find()
lib: add test for the page-grain allocator

The one that backs the slab allocator, for want of a better name.