MB-11367: Make sure we properly release connections with the same name

When we have a connection that gets registered with the same name as
an existing connection we need to make sure the connection is
cleaned up properly.

Change-Id: I36d57aeb9a17460acb92bc926e162a6009b9e002
Reviewed-on: http://review.couchbase.org/38714
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-11367: Properly close all upr connections during shutdown

When we shutdown we need to close all streams before clearing out
all of the connections in the connection map.

Change-Id: I80679547c8ad9d278f5d6a3baac7668146dd012d
Reviewed-on: http://review.couchbase.org/38715
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>