Tweak QuoteTransformer to more closely match PHP doQuotes.

We accumulate a chunks list alternating between quote and non-quote content,
like doQuotes does, and can look at more than one previous token's context
when deciding whether to balance quotes.  We still don't match PHP's
quote parser exactly, but we get closer.

Also duplicate doQuotes algorithm for converting quotes to tags; this
avoids depending on the html tree builder and ensures that our quote
sequences match the PHP parser so that we pass parserTests.

We edit some previously-forked parserTests, now that our output is
closer to the PHP parser's output.  Parsoid still leaves empty open/close
tag pairs where PHP strips them, so we need to fork a few new tests as
well.

Bug: 49926
Change-Id: I7e19565734e7ea1366b95471e46753423e208241
Merge "Tweak QuoteTransformer to more closely match PHP doQuotes."