Add darwin to if block

Otherwise it would fall into the 'win' else block because strpos($os, 'win') does also match 'darwin' what is the `php_uname` for OS X.
Refactor MailSettings controller

- Do not store the password (fixes https://github.com/owncloud/core/issues/11385)
- Refactor to AppFramework
- Add unit tests

Conflicts:
	settings/admin/controller.php
fixing typos
Added download size on public sharing