Track migration flow

Prevents unsupported migrations by comparing the current version with versions returned by update feed and package version file.

Ref https://github.com/owncloud/core/issues/11078