Related: #i124516# handle bad surrogate pairs gracefully on Windows

When running into invalid Unicode surrogate pairs the text layout code on
Windows ran into massive problems like crashes. This change detects the
situation of an invalid surrogate pair and falls back to treat it as
a simple character instead of requesting a complex glyph fallback.

(cherry picked from commit 913f1fc4b1362f6e91595af5ae10c4cba79fd355)

Change-Id: I2988f4b64061d0a5df211f6f0f04b1f235fcd6a5