Refactor to share $tableRows variable between views, use method to build dialog box title

* Instead of redeclaring $tableRows inside a view, stash it in CodeComments so all the views can access it.
* Use buildDialogTitle to construct the title of the "Add comment" dialog box.
* Fix a bug where the dialog box wasn't getting the correct title if "Reply" was clicked on a line comment.
* Removed "TODO: + links" comment which probably applied to anchor links.