Improve sharing pagination
Improve sharing pagination

Basically we did in almost all cases did a query to much.
This resulted in an extra query for each share type.

Signed-off-by: Roeland Jago Douma <982d370f7dc34a05b4abe8788f899578d515262d@famdouma.nl>

andreas-p/nextcloud-server,nextcloud/server,andreas-p/nextcloud-server,michaelletzgus/nextcloud-server,michaelletzgus/nextcloud-server,nextcloud/server,nextcloud/server,andreas-p/nextcloud-server,andreas-p/nextcloud-server,michaelletzgus/nextcloud-server,andreas-p/nextcloud-server,michaelletzgus/nextcloud-server,nextcloud/server