Traverser and Pickler improvements.

This is an improvement on #3019 which implements pickling and unpickling of Trees with Traversers rather than only describing the possibility.