Router rewrite and support of singleton belongs to resources

It's proof of concept and WIP branch, which will be squashed and completed, you put green light on it.

- Rewrite of the router definitions
- Add`s ability to define singleton resource