Reduce code duplication for parsing messages into dropdown menus
The same behavior was implemented by Xml::listDropDown(),
Article::confirmDelete() and HTMLFormField::getOptions().
A new function Xml::listDropDownOptions() is added and
all three are changed to use it.
Additionally:
* Xml::listDropDown() now uses XmlSelect internally to generate the
dropdown HTML.
* Xml::listDropDownOptionsOoui() is introduced to handle converting
the existing format to the OOUI format, which was previously
duplicated in Article::confirmDelete() and HTMLFormField::getOptionsOOUI().
* This change allows HTMLForm 'select' fields (HTMLSelectField) to
support nested options (optgroups) in OOUI mode. This is a
prerequisite for T117781.
Bug: T117781
Change-Id: I0a088f61eb32ec59677113583c7ecdcbc3fd2af0