Process comments and fix sidebar table of comments

* Fixed $(ready) thing
* Removed console.log statements
* Simplified conditional branch as requested
* Moved constants to top of module
* Not sure how to simplify event handlers. Don't know jQuery event delegation, so no change there either.
* Changed reveal(cls) to tap hideBuildSteps() for removing CSS ops
* Altered generation of sidebar content, so it finds any links associated with .reveal-foo, and trims them out of the sidebar.
* Move docCookie into separate module