SERVER-10707 use ScopeGuard to close sockets in setupSockets

fixes coverity leakage report