gui2/tchat_log: Refactor log formatting and page extents calculation

This functionality will be shared with a new Copy to Clipboard button
and its callback in the next commit, so it has to be refactored so that
we don't wind up with duplicate code. This is also why
gui2::tchat_log::model::stream_log() now has a 'raw' parameter which
defaults to 'false'.

I couldn't resist the temptation so I added some const specifications to
a few write-once variables, in particular those that ended up in
gui2::tchat_log::controller::calculate_log_line_range().

While I didn't change any existing behavior (to my knowledge, anyway), I
changed the algorithm for the 'count_of_pages' value as follows:

  // Before:
  count_of_pages = model_.count_of_pages() != 0
                   ? model_.count_of_pages()
                   : 1;
  // After:
  count_of_pages = model_.count_of_pages() >= 1
                  ? model_.count_of_pages()
                  : 1;

I don't believe model_.count_of_pages() can yield a value less than
zero, so this shouldn't alter the previous behavior in practice.
gui2/tchat_log: Add a button to copy the filtered page contents to clipboard

This copies the current contents of the dialog to clipboard. The button
currently lacks a tooltip because the tooltip has the potential to cause
map labels to glitch through the dialog when displayed (see commit
eab3e6fb646fda8cc6101a3e568c86c2b17b707f and bug #22176).