Rewrite the backend registering and use to math the Public API in core

Implements the Public API in core. https://github.com/owncloud/core/pull/11650