Fixes FilePreview for search results in New Files

When trying to view a preview of files found
via a search in New Files, the functionality
was broken and the navigation didn't work
for multiple files selected to preview.
This commit fixes that bug as well as does
some minor refactoring.

fixes CNVS-16554

Test Plan:
Pre-requisite: Turn on the "Better File Browsing" feature flag
* Go to any course's Files page
* Search for something that will return multiple results
* Select any or all of the items found from the search
* Click the preview button
* You should be able to preview multiple files and navigate
  through them using the arrow keys or arrow buttons

Change-Id: I364577df9ff02a21dc2a56b53fdc2eb4c496f8e2
Reviewed-on: https://gerrit.instructure.com/43611
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>