This is the nbdkit change transplanted to libnbd. Because there are
several subdirectory Makefiles which define the MALLOC_CHECK_
environment variables, I turned it into a macro which is placed in the
top level subdir-rules.mk.
Note this currently breaks valgrinding because of:
https://sourceware.org/bugzilla/show_bug.cgi?id=28256
and because there's not a good place to unset GLIBC_TUNABLES in libnbd.
Rich.