Added classes RefCountedObject, StrongPtr and WeakPtr.