Move to ES6 modules

Export as CommonJS and AMD
Build with Grunt