agent: IPC uses request/response header

Adding a requestHeader and responseHeader dramatically simplifies
encoding/decoding as we do not need to do a two pass decode.
agent: working on tests