Improve in-line documentation

...and incorporate a Grunt task to generate an HTML version using
[JSDoc](http://usejsdoc.org/).