Cleanup/reorganization/documentation of RascalModule

RascalModule: 
- refactored all code generation for function declarations to use a
single function.
- made all global state private and added accessors.

Other modules: changed as side-effect of the above.
Merge branch 'master' of https://github.com/cwi-swat/rascal.git