fix #1058 - Segfault at msg.cpp:154

The root cause of the problem seems to be -
* Sender sends a message
* encoder::encode() calls msg_t::close() after the message has
  been placed on the pipe (this is plain struct copy in
  ypipe_t::write()).
* receiving side dequeues message (also plain struct copy in
  ypipe_t::read()) and eventually calls close() on the in_progress
  message, never having taken ownership of the message metadata