Stable7 backport master improvements

Backport of https://github.com/owncloud/updater/pull/24 to stable7

Fixes https://github.com/owncloud/core/issues/10171
https://github.com/owncloud/core/issues/9527
https://github.com/owncloud/apps/issues/1636
https://github.com/owncloud/updater/issues/25