adding grunt-driven jshint and unit testing + making module compatible with AMD, browser, nodejs