scons: Don't explicitly add tcmalloc_minimal

SCons automatically adds a library to LIBS if conf.CheckLib succeeds,
so there is no need to explicitly add the library.
scons: Tell the compiler to avoid internal malloc when using tcmalloc

According to the tcmalloc readme, the recommended way of compiling
applications that make use of tcmalloc is to disable some
optimizations in gcc that make assumptions about malloc et al. This
changeset adds the necessary compiler flags for both gcc and
clang.

From the tcmalloc readme:
"NOTE: When compiling with programs with gcc, that you plan to link
with libtcmalloc, it's safest to pass in the flags

 -fno-builtin-malloc -fno-builtin-calloc
 -fno-builtin-realloc -fno-builtin-free

when compiling."
scons: Try to use 'tcmalloc' before 'tcmalloc_minimal'

tcmalloc_minimal doesn't support the heap checker on Debian, while
tcmalloc does. Instead of always linking with tcmalloc_minimal, if it
exists, we first check for tcmalloc and then use tcmalloc_minimal as a
fallback.