Fix handling of consecutive quotes in ChoiceFormat et al.

Two consecutive single quotes ('') must be interpreted as an
escaped single quite sequence. We were implementing it by simply
keeping track of whether the last character was a single quote.
This is insufficient for sequences of three or more quotes since
we shouldn't emit ('') for an escape sequence of ('''). We'll have
to keep track of the number of consecutive quotes we've seen in the
input instead.

This is a partial fix for the bug below. There appears to be another
bug in MessageFormat itself in its handling of subpatterns.

bug: 19011159
Change-Id: Ia71e5d8c1962356cabc265cf80ebc0a04ff84f17
2 files changed