Fixes broken PDF viewer

PDF viewer now correctly detects the files app.
Added missing JS dependency.

Fixes #1409
Fixed PDF viewer layout/container in public mode

In public mode the PDF viewer was appended below the content/preview.
This fix pases it into the preview container which is whatever is
displayed in the middle of the page.

The close button is now only visible when a files list is present
(public or internal) to go back to.
Disabling PDF viewer in public mode

The PDF viewer is currently not able to correctly load a file through
the public API, so disabling it for now in that mode.