Fixed array detection on public download

When downloading a folder called "0001" PHP should fallback to parsing
it as string and properly detect that it is not a JSON array.
Close session when loading apps

Otherwise the session is blocked while all remote apps are loaded. This can be very annoying especially when apps.owncloud.com is down or not reachable.
distinguish between file dependent shares and other shares
Retrieve storage numeric id earlier when still available

The numeric id is only available before the storage entry is deleted, so
get it at that time.
Merge pull request #11537 from owncloud/filenamewithzeroes

Fixed array detection on public download
Merge pull request #11542 from owncloud/fix_failing_unit_tests

distinguish between file dependent shares and other shares
Merge pull request #11546 from owncloud/users-deletewithfilecache

Retrieve storage numeric id earlier when still available
Merge pull request #11543 from owncloud/closeSessionForAppsLoading

Close session when loading apps
Set overwritemailurl* configs on setup
Correctly use overwritemailurl value when generating absolute urls in CLI

Fix #11500
Rename the config to *cli
Add overwrite.cli.url to the sample config
Revert separator fix, fixes unit test