ve.ce.TextNode: Simplify #getAnnotatedHtml logic

This is perhaps a tiny performance improvement and definitely a major
readability improvement.

* Pull `!significantWhitespace` condition out of the loop, merge the
  two identifal `if`s that result.
* Remove useless `i !== 0` and `i !== data.length - 1` conditions, we
  can never have a space on the first and last position because they
  have already been converted to nbsp above.
* Remove useless `data.length > 2` condition, it does nothing for the
  same reason (a string of two-of-fewer characters will never contain
  literal spaces at this point).
* Merge nested `if`s.

Change-Id: Ic832e06afac34600feb1a9d22ff421c12aa931ad
Merge "ve.ce.TextNode: Simplify #getAnnotatedHtml logic"