Older GCCs do not allow scoping types for return value of functions. Explicitely typedef a longer name to fix this.
The new generic ItemRelation template class replaces ResourceTreeItem's, resulting in cleaner and better organized code. In the future other kind of items can be linked hierarchically using the ItemRelation template.