Refactored webspace collection array serialization

- Moved responsability for converting objects to arrays to the objects
  themeselves to enable reuse elsewhere.

This is a prerequisite to including information on the objects in this PR in the debug toolbar.

This information should increase developer productivity.

- [x] test coverage
- [ ] gather feedback for my changes

__Informations:__

| Q             | A
| ------------- | ---
| Tests pass?   | yes
| Fixed tickets | 
| BC Breaks     | no
| Doc           | 

This feels a bit wierd, but I think it makes more sense to have a `toArray` method than a `jsonSerialize` method. There might be edge cases where `jsonSerialize