SERVER-12642 validates input to the distinct command

MCI patch for all tests on linux and windows: https://mci.10gen.com/ui/version/539f41993ff12253ed000001_0
MCI patch for compile on all systems: https://mci.10gen.com/ui/version/539eef0a3ff1225ef7000006_0