Fix up various compilation warnings

Most of these warnings relate to not casting to void for the `%p` printf
specifier, which for some reason warns on GCC/Linux, but not clang.

Change-Id: I7e5ba55350f8ccff6cdd56620bbb9e71fbc83f13
Reviewed-on: http://review.couchbase.org/42476
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>