pluginloader: check read/write before closed
pluginloader: check read/write before closed

first try to read or write on the socket before checking the closed state. This
makes sure we handle all data on the socket before erroring out.

justinjoy/gstreamer,justinjoy/gstreamer,justinjoy/gstreamer,justinjoy/gstreamer,justinjoy/gstreamer