Added counters and other internal debug
Wait and poll for the client thread to start

Signed-off-by: Blair Steven <blair.steven@alliedtelesis.co.nz>
Worker thread for client library watch callbacks to prevent blocking apteryxd