Fix master bug

What if there is only 1 slave? 0 threads?
Improve log of failed keys to reduce
Fix master-slave protocol on end of map phase

Now slave receives END_MAP message when master stop sending
MAP_CHUNK messages, slave then responds with IDLE, and master
waits for it before starting reduce phase.
Add ghost code for debug on master