Add JSDoc comments

Originally I didn't think these were necessary, but there are enough subordinate functions in `routes.js` now that it seems worthwhile to have better comments. (`app.js` doesn't have JSDoc comments per se, but it does have explanatory comments on each major setup bit.)

Note that this is a pull into `nj/show-author`.

@dangoor