Add config options to use custom template and single module template.

In out environment we are loading code via Require.js and needed to wrap all modules into define() call to avoid creating shims for each of many-many templates.

This patch allows to use custom template to produce module source code.

README.md and test updates are also included.