Remove redundant strings copying and to/from c_str() conversions
- Remove missing const-reference qualifications when passing around and handling string arguments in commands (especially in *Command::InitialPass functions)
- Factor out unused variables in some places
- Get rid of explicit std::basic_string usage in cmSystemTools. Replace with std::string.
- Extract variable referencing args[i] in some cases to avoid excessive copy-paste usage (also in InitialPass)
Not all CMake sources are surely inspected deeply enough. There are still many copy-paste things around and other things to be refactored, I am aiming to refactor these step by step as aggregating all the changes in one MR is somewhat hard to observe. Please point me if I am wrong and this work needs to be done in a single batch.
Topic-rename: reduce-string-copying