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. .gitignore
  2. include/
  3. priv/
  4. rebar.config.script
  5. src/
  6. test/