OAK-527: permissions (wip) - calculate readstatus for the root tree - move tree type handling out of ImmuableTree - testclass for readstatus