Add qUnit test, add gruntjs, add tasks for compiling/testing library code, fix a couple errors reported from qunit