XWIKI-11521: Send 3 new events for the email feature, mail ready to be s...

...ent, mail sent, mail error
Look at the current API, it uses a MailResultsListener interface. This is more powerful since it allows to pass whatever instance you wish (persisted, inmemory, a single one for several send, a different one for each send, etc). Something you cannot do easily with Events and EventListener. There are also several consequences, this has been a 2 hours discussion so far and we haven't fully concluded yet. I'm still brainstorming at the script service api level (which is the blocking part right now)...