berkelium-cpp: added native object counter for memory leak detection