build: add support for GCC sanitizers (asan, lsan and ubsan)

Add support for GCC sanitizers: address (asan), leak (lsan) and
undefined behavior (ubsan).  These can be toggled in ./configure with
--enable-asan, --enable-lsan and --enable-ubsan.

The autoconf code for this derived from ell (mostly authored by Mat
Martineau <mathew.j.martineau@linux.intel.com>):
https://git.kernel.org/pub/scm/libs/ell/ell.git

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
3 files changed