MB-20585: Fix three memory leaks
Recent changes have snuck some leaks in.
1) CouchKVStore refactoring allocated two buffers when a single
larger buffer should be used. The second buffer never gets freed.
Also a new/free mistmatch between couchstore/ep-engine is fixed.
Introduced by - 8350175
2) The watson -> master merge fixed a TSAN issue, but introduced a leak
in DcpConsumer code.
Introduced by - 7ed33aa
3) Changes in connmap mean test code can now leak cookies because the
cleanup task runs every second allowing a test to finish with an
allocated cookie.
Introduced by dd2bf1e
Change-Id: I8e63a51a4a6ec0c88782a6f487ced648d36afd2e
Reviewed-on: http://review.couchbase.org/66913
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>