major restructuring and cleanup

NB: this is based against a new codec-3 branch for 3.0.0+ large API changes

- many inner classes moved to their own file
- packages added to help organize classes
- static methods moved to more specific or more intuitive places
- Codec.Set renamed Codec.Field
- Codec.TYPE enum removed
- getSingleton methods replaced with public INSTANCE constants