XWIKI-10517: Create the XWiki.Mail class/document at initialization time
+ Added functional test (not fully finished yet)
+ Fixed bug discovered by func test