cmake: Fix read-after-free while checking command-line arguments

Since commit v2.8.12~300^2~1 (CLI: Suppress the unused warning if the
key value pair is cached, 2013-05-16), cmake::SetCacheArgs saves a
cachedValue pointer and may cause the memory to be freed (by setting the
cache entry) before reading it again.  Fix this by saving the old value
in a separate string.
Merge branch 'backport-fix-read-after-free' into fix-read-after-free

Resolve conflicts in Source/cmake.cxx in our favor.
Merge topic 'fix-read-after-free' into next

5b2c2d2f Merge branch 'backport-fix-read-after-free' into fix-read-after-free
fe44f057 cmake: Fix read-after-free while checking command-line arguments
Merge topic 'setlocale'

c746b00e Encoding:  Change to only set LC_CTYPE to fix encoding issues with libarchive.
Merge topic 'add_jacoco_coverage_parsing'

558c2190 CTest: Add Jacoco Coverage functionality
Merge topic 'buildsystem-doc-updates'

20f54602 Help: Link to Object Library docs from add_library
a8153181 Help: Organize add_library command documentation
d8319f0f Help: Update style guide to use section headers for command signatures
50dca471 Help: Organize Binary Targets section of cmake-buildsystem.7
4054534c Help: Mention INTERFACE_SOURCES as settable for INTERFACE libs
Merge topic 'fix-read-after-free'

5b2c2d2f Merge branch 'backport-fix-read-after-free' into fix-read-after-free
23ffb72a cmake: Fix read-after-free while checking command-line arguments
fe44f057 cmake: Fix read-after-free while checking command-line arguments
Merge branch 'master' into next