some source code reorganization

* move module.coffee to patterns/ folder
* remove types.json, only use astUtils.TYPES
* remove old compiled JS files in build/
integrate findModules into doc-gen