More progress on the refactoring.

For example, private vars of base classes are now supported again.
WIP, a new go at reworking the IR
Fixing merge conflicts, review @phaller
Adding transient2 test using (approx) Spark clases