Doc comments for hal and lib.

Just leaves `drivers` (and `platformtree`) to go.
I'd quote those with backticks, i.e. `.data` and `.bss`...