Restore compatibility with curl < 7.16.2

Follows-up 58f71c7e9eca, which assumed that the CURLOPT_CONNECTTIMEOUT_MS
constant was defined.

Bug: 58178
Change-Id: Id31a3ec56e4c7cac7d3edb2653c87be467d1a471
(cherry picked from commit 33bc02fad1b73a06e402ea0d19d951b60ca30256)
Fixes for plural handling

* A new protected method looks for explicitly defined forms. Every
  overriden language class is required to use this method.
* Make explicit plural forms work for Russian. Russian has overridden
  convertPlural method, that was not taking care of explicit plural
  forms.
* Plural rules were updated to CLDR 24 for Manx (gv).

Bug: 46422
Bug: 47099
Bug: 54514
Change-Id: I46ab3dadc7fe08c1e60bbd81a1ee841e166e9608
Corrected the MediaWiki 1.22 Release notes

The MediaWiki 1.22 Release notes say "THIS IS NOT A RELEASE YET", which was corrected.
The stable release version is 1.22.0, not 1.22.

Bug: 58233
Change-Id: I20e2754912b9fd76a4c57e980d5166545229c417
Update .gitreview for REL1_22 branch

Change-Id: I837bf55af31fc2a5b1d021213098664486f51280
Merge "Fixes for plural handling" into REL1_22
Merge "Corrected the MediaWiki 1.22 Release notes" into REL1_22
The Release Notes for Mediawiki 1.22 was updated.

Depends on change #102132
The line "MediaWiki 1.22 is a large release that contains many new features and bug fixes"
was inserted.

Bug: 58233
Change-Id: I7c5cc929826e4f5eb3b8974574aff34886a66738
Corrected memcached.txt in MediaWiki 1.22

The sentence, "The newer PECL module is not yet supported." is wrong.
It is changed to "The newer PECL module is supported.".

Bug: 47486
Change-Id: I3111f82843360c3fa57394a980272b62cea8148e
Backport the CLDR 24 changes from 1.23

Bug: 56931
Change-Id: I24be55a4cef02a408c378791dcd42d3f2efb9d68
DatabaseInstaller::setVarsFromRequest needs array

Method is not marked as var args.

Bug: 58434
Follow-Up: I920b0231db1b70b68c6c8907257c288a0e112668
Change-Id: Ief7f7c06e75efbe7ae1da13f5021a9062483f690
(cherry picked from commit 29c2ab3da0d561428f1fc969daadcac463e675b6)
More RELEASE-NOTES-1.22 improvments

Added note about curl, moved section about 1.22.1 ahead of 1.22.0

Change-Id: I70970c03dbcfcb567881a007cda3e739be89d5dd
WebInstaller: Don't call getSoftwareLink()

This gets the web installer working without the mysql or mysqli
PHP extension, which is not needed for other database systems.

* Avoid "lego" construction: put link text directly in the messages,
  which because the messages are parsed as wikitext, is easy to do.
* Put URLs in separate, ignored messages to avoid duplication in
  Database*::getSoftwareLink().
* Because I had to touch a MySQL-related i18n message, I figured
  this would be a good time to address bug 28281 (regarding MySQL
  forks and Special:Version).
* Other miscellaneous message changes, such as recommending the
  mysqli PHP extension over the old, deprecated mysql extension.

Bug: 28281
Bug: 58167
Manually cherry picked from Change-Id: I6dbc9d32c8c2d8f233a67d574229b80444885aea

Change-Id: I6296a106ffaf5f24fca29eacadc7721d9b83340c
Merge "DatabaseInstaller::setVarsFromRequest needs array" into REL1_22
Fixed fatal error when getLocalCopy() fails

bug: 40166
Change-Id: Ibfcddc1a9c05fad4ac0b51a5a046d1ffaeb49db8
(cherry picked from commit 6c5104111cb2545b04f16fcb4a7efe419344b44e)
make release notes ordering more consistant

Change-Id: Ia48e44a33f5317f2435d65c5021714a9c0dc5806
Add sequence support for externallinks table

Database field el_id was added with
Ib6b0fc3736d173fa4ba7b786ecfc710b2f4711bb, but due to autoincrement in
mysql no sequence support was added.

For mysql this is a nop, it adds a field to the insert but that is null
and mysql autoincrement will fill it.
INSERT /* LinksUpdate::incrTableUpdate 127.0.0.1 */ IGNORE
  INTO `externallinks` (el_id,el_from,el_to,el_index)
VALUES
(NULL,'1610','http://de.wikipedia.org/wiki/Hauptseite','http://org.wikipedia.de./wiki/Hauptseite')

At least Oracle will need it

Bug: 58435
Change-Id: I3f68ea8d99c5450c0c66feeb1469ef0ee6cc4eab
Changed FOR UPDATE handling in Postgresql

Postgresql cannot handle FOR UPDATE with outer joins, but it allows
specifying which tables can be locked. This changes DatabasePostgresql
to render proper FOR UPDATE statements that only include the main
table and any tables in inner joins.

Bug: 47055
Change-Id: I1ac587ac39f448b9e7f4befb44826b43044ad6f0
(cherry picked from commit 63d32eeb6f23b68ed783d6f6b5c6b39067b6316b)
Merge "Changed FOR UPDATE handling in Postgresql" into REL1_22
Revert "Include short descriptions for extensions bundled in the release"

This reverts commit 2e1852ad6c54808bdd9b14000e7f1438ec1856c7.

Change-Id: I721b694d45ecba7918cc7b53a33868867ea12e9f
Make MagicWordArray compatible with PCRE 8.34+

In PCRE 8.34, a subpattern's name must not start with a digit; work around
this by replacing digits in the synonym's index with letters. Amazingly,
this part of the name seems to have the sole purpose of ensuring uniqueness;
none of the matching functions actually use it for anything.

Adding a single-letter prefix was considered, though it would risk breaking
extension code that may have used 29- or 30- character magic word IDs.
(PCRE limits subpattern names to 32 characters.) Likewise, moving the magic
word's ID to the front would not work if it were to start with a digit.

Bug: 58640
Change-Id: Ic69f9000addbf18c4747105187e6f13191828fbb