ctest_memcheck: Add support for memory and leak sanitizer.

This adds support for memory and leak sanitizers.  This is built into
clang and gcc 4.8 and new compilers. It is activated with a -f switch
during compile.
CTest: Fix MemoryCheckType from 'ctest -T MemCheck'

Before this commit, you would have to run ctest -S mode to get
MemoryCheckType to work. This is because CMAKE_COMMAND was not set.
The fix is to use cmSystemTools::GetCMakeCommand instead.
Merge topic 'thread-sanitizer'

1e005ead CTest: Fix MemoryCheckType from 'ctest -T MemCheck'
44726714 ctest_memcheck: Add support for memory and leak sanitizer.