C++ codegen: Free pointers based on their own value, not based on a separate flag
Currently (0.8), pointer properties that are set lazily use a separate flag to tell when they need to be deleted again in the destructor. It would be cleaner to check the pointer value itself instead (which requires to first implement issue #244).