Optimize minimal step upgrade

we can check each possible step in begin and store changesets in a
dictionary. Later on during install steps we select the smallest step
from the dictionary and after installation packages handler are removed
from others steps.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Only adjust versions for upgradable packages

To avoid instantiate all python package objects during init we can just
adjust versions for upgradable packages. Later on code has to adjust
versions for newly installed dependencies.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
No need to clear during rewind

rewind_cache is only called after open that makes cache clear from our
changes. But we still need to adjust versions that can be done from
rewind directly.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Remove unused clear method

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>