Sets an attribute to this, which will be accessible to any node in it.
a Tree object
attribute name
a Value, or null
a function to be called when attribute is not needed anymore, or null
attribute