Allow debug backend to be used even before MMU is configured

Buffer up the messages, and then print them out once the real
UART I/O memory can be mapped.
Add annotation to let compiler check arguments of printk()
Refactor kernel object lifecycles to use reference counting

This allows sane decisions about when to deallocate message-passing
primitives that are closed but still referenced by others.
Refactor Doxygen setup to use Waf's built-in support