Add a testing hook to clean name caches
When a reference descriptor has found out its name, it caches the name. This
means that tests of code using references may pass when run in one order but not
in another, or tests may pass but the application breaks anyway. It should be
possible for tests to have cached names cleared to improve test isolation.