Implement mhng-sync and message responses

Most of the code here is responsible for actually blocking on daemon
responses, which wasn't implemented before.  The rest of the code just
blocks on a sync message.
Update the current message on insert() when none exists

The general idea here is that I frequently empty my inbox and therefor
have no messages at all.  When this happens I end up with no current
message and therefor the next stored message being stored to index 1
but the current message will end up somewhere else -- possibly to a
later message.

This just cleans things up a bit and makes sure to reset the current
message when there's no current message.
Name the  "mhimap-idle" process correctly

I guess I should have added some utility functionality to make this
unnecessary as it's a bit of a paint, but now it works... :).
Drop an extra printf

Whoops!
Add a missing <unistd.h> for OSX
Only fold when the output is a terminal

I think this makes sense, but it's probably not particularly important
because you should really be using the pipe commands, but I guess I
did this for some reason...