GATEWAY-3273: Added unit tests for core mail package.

- unit tests for core mail package.
- reworked poms to inherit versions from dependency-management
- added fix for nhincuser create user issues on a first time build. (part of GATEWAY-3222)