Improve error handling on recieved ipc data

ipc_recv_message returns the GIOStatus of the last read and handles
errors properly.

Fixes an infinite loop issue on socket disconnect (EOF).