cmAlgorithms: Preserve const-ness in cmRemoveDuplicates range signature The pattern `vec.erase(cmRemoveDuplicates(vec), vec.end())` fails to compile with GCC 4.8's libstdc++ if `cmRemoveDuplicates` returns a `const_iterator` because `end()` returns an `iterator`. Overload `cmRemoveDuplicates` to return an iterator type matching the const-ness of its argument.