Phs/extract type submodules

`Type` and `TypeSpec` are enormous.  Extract some code!

The ruby types can be simplified further (`NamedType` and `PackedType` can track their satellite information in ruby, and the equivalent java types can be dropped completely.)