Bug 991427 - Check if the last character of the string is part of a surrogate pair when truncating text for display in the context menu, to avoid splitting surrogate pairs, r=gavin