[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.
Hmm, OpenConext/OpenConext-engineblock, simplesamlphp/saml2 and janus now have a timeprovider thingee. Hopefully in the future we'll find something that works for the three of us.