Fix DB-to-cache pipeline

::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
Merge "Fix DB-to-cache pipeline"