Add an option to build system to turn on address sanitizer.

Also add a couple of cmake macros for adding compiler and linker flags
if supported by the compiler.
Build with address sanitizer enable for travis-ci.
Add clang to travis build matrix.