EmulatorView: fix off-by-one error in linkification bounds

Links currently don't extend to the last character of the link text
(this is easy to check, either with a pixel-accurate pointer device such
as a Bluetooth mouse or in the emulator) -- fix this.
EmulatorView: fix linkification on non-basic lines

Linkification currently assumes that each char in the array representing
the line maps one-to-one onto a screen column.  However, this is
demonstrably false in a Unicode environment, where one screen column can
take an arbitrary number of chars (surrogate pairs and/or combining
characters) and one char can take two screen columns (East Asian wide
characters in the BMP).  As a result, links end up misplaced on lines
where these more advanced Unicode features are in use.

To fix this, we need to properly determine the screen columns the link
spans, taking into account the above; unfortunately, there appears to be
no way short of iterating over the entire line up to that point to
discover this.  To lessen the performance hit, we add support to
UnicodeTranscript and TranscriptScreen to allow EmulatorView to
determine if scanning the entire line is necessary and only scan the
line if we must.
Merge pull request #321 from steven676/for-upstream

Linkification bugfixes