Move internal modules in a separate as_ namespace

There are few things I'm not totally happy with:
- some documentation is duplicated in the main .mli and the internal ones
- there are still some internal types which appears in public interface, because of the custom actions for generate source file. Need more examples there to get the right public API.