Improve string truncation behavior for strings truncated in a very long word
A better rendering in this case is "X: YYYYYY...", where we chop the long word in the middle.
Tweak the logic a bit to handle this case better.
This will support improving the display behavior of long package names in the table of contents view.
Test Plan: Added/modified unit tests, got a clean result.
Reviewed By: amckinley
Maniphest Tasks: T13151
Differential Revision: https://secure.phabricator.com/D19477