Update code throughout linterReporter for better style and performance.

Mostly fixes from previous PRs of mine. Some (seemingly) better comments and ways of doing things.

@MiguelCastillo: I'll add comments on the lines where I want to better document why the change was done.
I don't really think we need to check that we only add it once: even if a class was added more than once (jQuery broke!), nothing breaks. I don't think that `$element.addClass` is costly enough to not run it every error.