fix cid matching in plugin ipc
fix cid matching in plugin ipc

The cid need to be allocated until a reply is received, not just while
the data is being written to stdout.

openmotics/gateway,openmotics/gateway