Add alloc_hooks API to mock server

To allow tests using the mock server to make use of the allocator
hooks API, expose them through the mock server.

(re-apply, after previous revert: d4d7865)

Change-Id: I0846147aeac5f79398d0b6801c4b82be13f4156b
Reviewed-on: http://review.couchbase.org/42465
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: abhinav dangeti <abhinav@couchbase.com>