A base C++ class to provide reference counting - helpers