tidy-up namespace

compress unneeded traits
compress enumerations for SchemaType and Cardinality
reduce namespace noise with package private
move generated types into sub package
move AST types into sub package
fix samples to latest
fix macro deprecation warnings