Move mail api to json/api format

Fixes #2650
* rerouted all mail sending to api/mail
* changed request and response formats to json/api-like structure
* tested with forgotten password and new blog email
Merge pull request #2715 from javorszky/iss2650

Move mail api to json/api format