Remove the handling of updates in the generator

Updates are implicitly handled by whatProvides for install requests
Reduce whatProvides overhead
Use elseif instead of else { if {
Remove unnecessary collection of names which isn't used
Merge pull request #2734 from naderman/optimize-solver

Optimize the solver and remove unnecessary code