Added isPublic flag in files_sharing template

To make it possible for apps to find out whether they are running in
public mode, the flag "isPublic" will now be present in the DOM.

Backport of 6a36d7fa864ec241d05a00b419ca48cf84ca41ff required by other
fixes.
Disable versions app JS in public mode

Since the version JS code isn't used in public link mode, disable it to
prevent Chrome freezing bugs due to the t() call being synchronous.

Fixes #4545

Backport of 41c6c44221177da4458f982bb13a5c7a6f90ff8e