storageFormats: save pointer to tree in metadata.

Add the pointer to the event tree to the event metadata object. This pointer is
not used to save the event tree, which is saved separately in the root file,
but as an easy accessor. To facilitate handling of the metadata and the event
tree, add a function reading the metadata from file and setting the tree
pointer. Also change the signature of the other functions where the tree was
explicitly given in the arguments.