Fix text selection scrolling in messages window

When number of messages exceeds MAX_BACKLOG_MESSAGES,
older messages start to get removed. When this happens,
selection indices must be adjusted accordingly.

There was code for that, but it failed once selection
hit the beginning of window, making that selection
stuck there forever, selecting over new text
as it went in.

This code correctly trims the selection until it
ultimately becomes empty.
Add comments for some message structs
Merge branch 'fix-selection-scrolling' of https://github.com/albel727/uTox

#
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.