Make current tree depth a backend instance attribute.

Also, the parent can go, as it's accessible as n.parent in all cases.

I've found this to provide a much more convenient API when doing
anything that resembles pretty-printing.  Downside: you can't share a
backend across threads.  Considering that still leaves open many ways to
parallelize compilation of surveys, I don't see that as a big deal.