Add getters for transition.{attr,style}.

Proof-of-concept for #866.
Seems like a shame to set these even when these functions won’t be used. I wonder if there’s a way to restructure the code slightly. (I guess it’s also a shame that these closures are instantiated even though they won’t be used, too, though I’m not sure what the performance implications would be of extracting them.)