Refactor MailSettings controller

- Do not store the password automatically (fixes https://github.com/owncloud/core/issues/11385)
- Refactor to AppFramework
- Add unit tests
Well - it we touch the interface of OC_Mail I question if we should not introduce different methods like phpmailer has where we can call methods like addTo() or addInReplyTo().

If we do this I'd prefer to go in the direction of introducing a public api as well and let the server container instanciate the mailer object on request.