SERVER-12745: Fix shutdown race in closing sockets
Merge remote-tracking branch 'upstream/master'