Important refactoring and simplification of the DM

The DM now persists and restores its state.
It also handles cases where agents are not yet online, by storing messages to send later.
The REST API has been updated again. And there are some little enhancements.

Basically, this contribution...
* Simplifies the code of the DM.
* Brings useful features for users (message storage).
* Improves the reliability and security of the DM.
* Enhances the way the DM and agents exchange data through IaaS mechanisms.
* Fixed several Sonar and Findbugs warnings.
* Hopefully, increases code coverage.