Compilation fixes

Compilation fix for some systems: 
sleep - by manual 'sleep' is available at unistd.h, and on some distribution - it is not included by <cstdlib>, <iostream> or <jsonrpc/rpc.h>.

Also 1 warning is fixed at debug output.