IsOff: Use the length for the string construction

No need to waste the calculation and force the string to call strlen
again.
SystemTools: Use a set in Is{On,Off}

Also check before calling toupper() umpteen million times.
cmSourceFileLocation: Avoid string allocation in extension checking

The substr call was causing excess allocations. Swap the cheaper
character check to be before the longer string comparison, now using the
prefix checking function.
SourceFileLocation: Consolidate logic in Matches
cmSourceFile: Cache the isUiFile check

The filename extension call is expensive, so cache the .ui check.
strings: Replace stringstreams in hot code

Streams are expensive to construct (looks like some locale-related
stuff), so use strings instead.
strings: Use snprintf rather than sprintf
containers: Use .empty() rather than size() where possible
iterators: Use 'i->' instead of '(*i).'
cmCTestBuildAndTestHandler: Improve the argument parser

Use an if/else tree and cmHasLiteralPrefix.
INC conditionals: Reorder statements for short-circuiting

Put cheaper conditions first to hopefully avoid expensive calculations.
strings; Use .size() instead of strlen(str.c_str())
container: Use .rbegin() to get the last element of containers
strings: Use .resize() instead of assignment

When doing:

    str = str.substr(0, len);

a reallocation is triggered. Instead, use .resize() to shrink the
string.
INC containers: Cache the size when parsing arguments
INC strings: Store const& for local variables
INC strings: Unnecessary casts
targets: Use string for target name parameters
variables: Pass variable names as strings

If a string is already available, pass it directly instead of making
another.
properties: Use strings when available