New version of TR unit tests.

This is the rewrite of the TR unit tests that makes it so that the code correctly runs at phase 1 like TR normally does. This should allow for removal of hacks that existed solely because the phase of identifiers was wrong.

Currently this is failing two unit-tests with internal annotations, not sure why yet.