refactor: of_length now creates a length_t object

length_t is not publicly constructible, and should only be used in
library interface.  User code is not affected.