SERVER-15056 Sharded connection cleanup on setup error can crash mongos
(cherry picked from commit 18dba6ed5bbe0d0177a81cbe660dcd93fcf18109)
SERVER-15056 Sharded connection cleanup on setup error can crash mongos

Collapse empty if body
(cherry picked from commit 87fa4e16af935e1c9c870878898ce46eacdea4e4)