apps: fix packagekit progress bar backword percentages
apps: fix packagekit progress bar backword percentages

Packagekit with apt backend reports backward percentages for the refresh
operation.

Guard these wrong values that the packagekit API returns by making sure
these are corresponding to an increasing percentage value.

Rewrite progress_reporter into a class and store the new percentage
value there as an attribute, instead of overwriting the object that the API returns, as
that it not public attribute.

Upstream bug report: https://github.com/PackageKit/PackageKit/issues/516

Fixes #16564

cockpit-project/cockpit,cockpit-project/cockpit,mvollmer/cockpit,mvollmer/cockpit,martinpitt/cockpit,cockpit-project/cockpit,cockpit-project/cockpit,martinpitt/cockpit,mvollmer/cockpit,mvollmer/cockpit,martinpitt/cockpit,martinpitt/cockpit,martinpitt/cockpit,mvollmer/cockpit,cockpit-project/cockpit