SERVER-13870 Use RAII to prevent memory leaking in shard targeting