Add option to preserve grapheme clusters in highlightQuery
Add option to preserve grapheme clusters in highlightQuery

Grapheme clusters in Indic scripts can be split by highlighting,
resulting in really ugly text in the suggestions. For example,
म +  े should equal मे, but doesn't if highlighting markup comes between
the two characters. Affected scripts include Devanagari, Tamil, Telegu,
Thai, Myanmar, Khmer, and Javanese, and probably others. Latin and
Cyrillic script also have the problem, but the presentation is not as
bad (at least on some browser/OS combinations).

- Define a comboMarks regex (equivalent to \p{Mark} in other programming
languages) in highlightQuery and check for comboMarks after following
highlighted text, and include them in the highlighting.

- Add parameter to highlightQuery to enable checking for and including
combining characters.

- Add parameter to setHighlightedQuery to pass through to
highlightQuery.

Up Next: After this is available, update call to setHighlightedQuery in
mw.widgets.TitleOptionWidget.js in MediaWiki to use the new parameter.

Note: This is only working toward fixing problems with **grapheme
clusters** in suggestions in the **big search box on the Special:Search
page**. The search box in the upper corner uses different code.
Ligatures, such as Arabic ي + ا becoming يا, are not covered by this
simple regex-based solution.

Bug: T35242
Change-Id: Iac79095a1b40ef92b3cfd9421916928217639434

wikimedia/oojs-ui,wikimedia/oojs-ui,wikimedia/oojs-ui,wikimedia/oojs-ui