Fix the internal solver to work decently again.

The heuristic have an hard-coded optimisation criteria (ie. upgrade the "root" packages to their latest version, do touch the rest only if necessary).

The recommended solution is still to use the external solver, but this could help anyway for portability reasons.