Bound retry count in measureCharInner hack for wrapping characters
Work around odd safari behavior in bad bidi rect feature detection

Issue #2780