Added Grunt to the project.

2. Fix potential errors and warnings reported by jshint.
3. Big change of the file structure. Demo files are in demo directory now.