Make “cosmetic” changes suggested by PullReview

These are stylistic and comment changes which shouldn't affect the
code, but do bring it into line with PullReview’s standard checks.

 * do end vs. {} for multiline blocks
 * reduce vs. inject
 * new hash syntax
 * comments for classes and some methods
 * single quotes vs. double quotes when no interpolation
fix double quotes in app/models/category.rb