Refactor MailSettings controller

- Do not store the password (fixes https://github.com/owncloud/core/issues/11385)
- Refactor to AppFramework
- Add unit tests
make trashbin compatible with objectstore, replace glob with search in cache, make unknown free space work like unlimited free space
force loading of encryption app
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.

Backport of 6cbabdf217f55df3655143aa82b6e5e74650df05 from master
distinguish between file dependent shares and other shares
Set overwrite.cli.url configs on setup

Correctly use overwrite.cli.url value when generating absolute urls in CLI

Fix #11500

Backport and squash of the following from master, in order:
- f0fcaff9b957f1e6c04f9bfd9b8e0eb84f78bbf8
- 923de0afd9a7e717a5e1d25747caf4840633db25
- a487ce76e86940c94801da6157bcf70ed4005c1f
- bd3ebdbd135b30946fdf55b41b5e96497d0c3e4a
always take unencrypted size
improved unit tests
Revert "Set overwrite.cli.url configs on setup"

This reverts commit 48a1e69f5e803d61edcd7d083fd8e794f5bf194d.

This was backported too quickly.
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.

Backport of d485c0098d58454b8dbd25e574a363a500244942 from master
fix flickering users
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.
fixing typos
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

Backport of 0407bc097895355b90bc722e8b58afb27a40d538 from master
Refactor Cache\Updater to work outside of the users home
Improve unit tests for Cache\Updater
Fix unit test
Fix warning in homecache
Update cache before post hooks
remove unstable test