connecache: fix multi-thread use of shared connection cache #4557
I was able to reproduce this on mac and even though there's no valgrind on this platform, address sanitizer and more assert()s helped me this track down. Will polish and commit a fixup within shortly. Hopefully this was the same issue we saw on freebsd too.
It could accidentally let the connection get used by more than one thread, leading to double-free and more. Reported-by: Christopher Reid Fixes #4544