Switched unittests from greenmail to javamail-mock2, some other small fixes