[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.
Yes Nelmio exposes the type used inside php, which is has been changed to a nested array, I understand this is not very usefull for java, it would probably be better use a type which is known in json.