Move link_text() changeset text into its own method

Addresses https://github.com/Automattic/trac-code-comments-plugin/pull/32/files#r9668332