Add unit test for memory tracking

Memory tracking (by linking with tcmalloc/jemalloc) is enabled in
production for accurate accounting of per-bucket memory usage, and so
it should be enabled as part of unit tests if we are to have
representative memory usage numbers. Add a test to this effect.

Change-Id: I17fe915441c790019b833189756cab2c93a8b641
Reviewed-on: http://review.couchbase.org/42462
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Tested-by: abhinav dangeti <abhinav@couchbase.com>