* modules/EntityRef.cpp, modules/EntityRef.h: Add a new class to handle a weak reference to an Entity. * tests/EntityReftest.cpp: Test the weak reference class.