Refactor MailSettings controller

- Do not store the password (fixes https://github.com/owncloud/core/issues/11385)
- Refactor to AppFramework
- Add unit tests
fixing typos
Merge pull request #11408 from owncloud/refactor-mailsettings-controller

Refactor MailSettings controller