Doc comments for hal and lib.

Just leaves `drivers` (and `platformtree`) to go.
I think it's "always use a trailing dot in the one-liner doc comment", no?