Modify the unit class to "have a" type instead of "be a" type.

This mixes in a lot of other small changes that would have been too
difficult to extract at this point.
Make the new unit back-compatible via delegation.
Merge branch 'new_unit'