Backport fix DB-to-cache pipeline for mw.org

::findMulti() is expected to return $results matching to the array indexes of
$queries.
FeatureIndex::findMulti() will cache whatever was returned by
BasicDbStorage::findMulti(), by that index. Unfortunately, BasicDbStorage was
not properly ensuring this query-index-to-result-index relationship was intact.

This meant that wrong data would get cached when a query could not be resolved.
In this case, the query that would not resolve was caused by
AbstractQuery::loadMetadataBatch, which attempts to getMulti( 'Workflow' , ... )
a bit too optimistic (it seems to request workflows that don't exist). This
resulted in some queries dropping out, and subsequent data being mis-cached.

Bug: 63616
Bug: 63617
Change-Id: Ic00288e46b01d2919de9472e0f225e83242887a8
(cherry picked from commit b002df8d0b5181db2fa57f82599f90d740fe0bb6)