Make couch_stream monitor the stream opener

This commit fixes a process leak which would happen when a process
opened a couch_stream and exited with reason normal before closing
the stream.

This patch makes the couch_stream gen_server monitor the process
which opens the stream. When that monitor sends an exit signal
the couch_stream gen_server is stopped and the process dies.

Closes COUCHDB-2365
2 files changed
tree: d135c53b5c0884b7e62b6cdb10ab523c81ec24b9
  1. include/
  2. priv/
  3. src/
  4. test/
  5. .gitignore
  6. rebar.config.script