tree: allow retrieval of raw attributes

When a tool needs to recreate the tree object (for example an
interface to another VCS), it needs to use the raw attributes,
forgoing any normalization.

---

This is some production code that turns out I never pushed upstream. It introduces extra computation every time we ask for the normalized version, though it shouldn't be bad enough to warrant caching.