[REVIEW] Fix remove items layer in api metadata origin/develop

Removed the metadata since it had no real value and resulted in incorrect output in the API, an array named items. The (dis)assembling logic was moved to separate tree builder/flattener classes. All refactored code was tested before the refactoring was done.
Is this a Nelmio thing? Because this might confuse @lvonk who doesn't think of an array as also being a hashmap.