add support for modular file structure

This adds an option to use a modular file structure via options.useModulesStructure"
Not sure if we could have just added the file structure we used as well, but anyway it's more error-prone this way.

PS: I also added karma config to the test watch triggers
we have a different .jshintrc for tests and for production code, I suggest we keep this behavior. It is more then globals. e2e tests use node.js, for example.