Makes `ipc_recv_response` return a struct with size, type and payload rather than just the payload string. This is useful if the type has to be checked on the client.
Also modifies IPC client so that we can work with persistent connections.