[ticket/11495] Move classes to tree/ as they all implement a tree

PHPBB3-11495
[ticket/11495] Move tests to tree/ directory

PHPBB3-11495