Fixed slow query in LocalFileDeleteBatch::getHashes()

* All the old files will have the oi_name of the $file

bug: 62360
Change-Id: Ie3aeee44a7ec1ef4cad0c0fcde9b7d0dba003da2
(cherry picked from commit 2354da05389233189e85580f1312d40b22baaa76)