tcmalloc: Only include tcmalloc tests if active allocator

Change the CMake configuration to only build the tcmalloc tests if we
are actually *using* tcmalloc, and not just if it was found (but a
different allocator was selected).

Change-Id: Icf40bf9b7dc6801ae274c868f19f52091b6dce22
Reviewed-on: http://review.couchbase.org/38542
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Correctly NUL-terminate log buffer

Change-Id: If19ef570617f3a841da87f3f08d3fb51a71ece36
Reviewed-on: http://review.couchbase.org/38543
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Merge master-branch

* master:
  Correctly NUL-terminate log buffer
  tcmalloc: Only include tcmalloc tests if active allocator

Change-Id: I7b6e24c05f0673c91fbfe07a7108f4f38c04273f