Doc comments for hal and lib.

Just leaves `drivers` (and `platformtree`) to go.
You can drop the `{` / `}` here.