Use modern 'distinct' syntax in tests.

The old syntax is now an error:
https://jira.mongodb.org/browse/SERVER-12642