Moved ipc handling into ipc_process.

Cottage now sends a type before anything else, this is then used to decide if we are dealing with config or functions.