Adds autodiscovery support to server-to-server sharing as specified in the specification. If no discovery data is found it is using the fallback ownCloud endpoints for legacy support.
The old code path is still used to get the sharing info in the webui.
This requires the file_target to be set. This does not mean anything
for federated shares.
Fixes#22215