SERVER-8158: Fix erasing "\t" and " " from config file strings.

std::remove doesn't actually delete elements from the container, it
only shunts non-deleted elements forwards on top of deleted elements