Feature/idle server when not running

There were also a few big changes regarding the tests and the agent proxy (now using REQ REP).
Added a ping command to the agent.