Rewrite runBatchedQuery.php
This maintenance script was previously introduced as a way to do large
UPDATE queries in a replication safe way. However, in modern versions of
MySQL, UPDATE...LIMIT is considered a non-replication-safe query, and
will emit a warning.
So instead, ask the user to provide slightly more structured data about
the update query being done, and partition the table based on an index.
In the UPDATE queries, specify index ranges instead of using LIMIT.
Also add a "db" option, which allows the script to update databases
which are not valid wiki names, for example, centralauth.
Change-Id: I462bdcb03e107af9db4738895952d5110f0ec4fc