update makefile for support Mac OS X and update UT

update makefile for support Mac OS X and update UT.
I test and run it on Max OS X 10.6 and RHEL 6.0.
I add some UT.Please review the buffer-test carefully.
before run the Unit Test please make sure the LD_LIBRARY_PATH already
include the libnessdb.so