New Files bug fixes

Fixes an issue with an undefined function call
when saving usage rights; fixes the bug where
restricted files that are only available by link
were not visible to students with the link; fixes
and issue with previewing a single item multiple
times.

fixes CNVS-17406

Test Plans
Prerequisites:
* Enable "Better File Browsing" feature flag
* Enable "Usage Rights Required" feature flag
* Go to any course's Files page as an admin or
  teacher and make sure that files exist and can
  be previewed (like an image)

Plan 1:
* Click on an image file's link in the file
  pane
* A preview should appear and the url
  for the browser should have the parameter:
  "?preview=SOMEID" where SOMEID is the ID
  of the file you're previewing
* Close the preview
* Click on the same file's link again to preview
* The url should be the same as before (make sure
  that the query param isn't "?preview=true")

Plan 2:
* Select any file and click the usage rights
  button for that file (a yellow triangle exclamation
  point icon)
* On the modal that appears, click "Save" without
  choosing a usage right
* An error should appear telling you to set the usage right

Plan 3:
* Select any file and click the publish button
* On the modal that appears, choose a usage right, then
  below, select "Restrict Access" -> "Only available
  to students with link. [...]"
* Click "Update"
* Preview the item you just saved
* Copy the URL in the address bar
* Open an incognito window or another browser and log in as
  a student
* Paste the copied URL into the address bar and go
* It should go to the Files page with a Preview that appears
  for that file
* You should able to download the file by clicking the
  "Download" button in the header bar of the preview

Change-Id: Id59af917d8d4dcf67b9acf3cc4119970b0731863
Reviewed-on: https://gerrit.instructure.com/45728
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>