Reimplement required_pkgs so it uses sat solver
Whole function required_pkgs is reimplemented. Its features are same as previous implementation, except its now also solving cycles in dependencies.
Also all dependencies are now canonized, no matter where they come from.
Whole implementation is not exactly clean. This is going to be fixed in future after all features we expect to add will be added.
This will be merged to branch deps. Request is branch sat to show correct diff.
Implements #122 (closed)