refactor(app): move to commonjs style

move some modules to commonjs style
to use these modules with server side (nodejs)
add grunt task for transforming to requirejs modules

time: 1h:10