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.
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 was to use cmSystemTools::GetCMakeCommand instead.
Merge topic 'thread-sanitizer' into next

7a82885b Fix MemoryCheckType from ctest -T memcheck.
5f8a81b4 Add support for memory and leak sanitizer.