pgraph: mark TransformState as invalid in destructor
This, in combination with ebef9f3de8d2eb1c3628a25fe3bd08aa59c8804d, makes it easier to catch issues in code that is accidentally letting get temporary TransformState objects get destroyed. It does not affect release builds.