SERVER-9032: Validate locale on startup

On some Linux machines, users may have not have a locale set which will
cause boost to fail. Validate that the user has a locale set, and if not,
give a useful error message, and exit.
Revert "SERVER-12642 validates input to the distinct command"
Merge remote-tracking branch 'upstream/master'