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: Ibfb70d20cf3365597d28ef7680fadd1f43a38cdd