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>