samples: Simplify code and prepare it for running in thread.
testing: Added unit test project with a first (still failing!) test for PUP-SUB protocol.