Clean contact listener

Refactor socket handling in contacter for robust closing
Implement PingMessage behavior. From worker to master.

Allows worker to know when master is shutdown in a not so clean way.