Refactoring collections and dataobjects endpoints.
Refactoring collections and dataobjects endpoints.

Also fixing and improving tests.

EUDAT-B2STAGE/http-api,EUDAT-B2STAGE/http-api,EUDAT-B2STAGE/http-api