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
Merge pull request #11570 from owncloud/backport-11408-master

Backport 11408 master