ccmake: Remove unused parameter to LoadCache
cmTarget: Use else/if trees rather than an if tree

Skips lots of unnecessary string comparisons.
cmTarget: Factor out common code
cmTarget: Fast path for regular properties
cmTarget: Sort special property checks

The LINK_LIBRARIES property is by *far* the most popular. Move it to the
top. TYPE is second, but with more generator expression usage, that may
change in the future.
cmTarget: Use static strings for special property names

The function is called enough that the std::string/cstr comparisons are
expensive from the strlen. Cache the strings for faster comparisons.
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.