fixed test errors with 2.2.
fixed test errors with 2.4
Fix tests that were failing against server 2.7.7.
Remove long ago deprecated Flags from CollectionStatsResult.