coprocess: return error when proto.Marshal fails (#1727)
coprocess: return error when proto.Marshal fails (#1727)

* coprocess: return error when proto.Marshal fails

* coprocess: add additional error checks and user defer for free() calls

lonelycode/tyk,lonelycode/tyk,lonelycode/tyk