Linted with minimal rework, jshint, test and uglify on Travis, add factory

Linted minimally using jslint and jshint options to mask warnings rather than completely rework large parts of code.
Add some Travis testing driven by Grunt, and Uglify test.
Added suggested factory with 'anew' method.