Fixed some issues discovered when building java API example program
Got RangeServer::heapcheck() to dump heap stats with tcmalloc_minimal
Fixed some issues discovered when building PHP API example program