SERVER-8891 Destroy static objects in a safer order

Change the order of some static objects and group them near the
start of the source file, along with a comment explaining what is
going on.  The crashes we've seen have been due to destructors for
ReplicaSetMonitors (triggered by the destruction of _sets) trying
to use the _seedServers map, which had been destroyed already.  By
changing the order of the object definitions, we destroy _sets
before destroying _seedServers, preventing the crash.

There may be other cases that are not solved by this fix, and there
is still a race due to the running ReplicaSetMonitorWatcher thread,
so this is unlikely to be the last word on crashes of this type.