Add PkgResolve module, use it in Pkg

Substitutes the linear programming approach to
package resolution with a max-sum algorithm