Caching

cache previously computed results within Souper

this includes some refactoring suggested by Peter to avoid using the CandidateMap from Pass

anyway it was pretty inelegant to repeatedly create the Solver from Pass, this is much nicer

The logic that I used while refactoring was that your check of isTriviallyInvalid() remains in AddToCandidateMap(), where I thought it belonged since it's better to avoid adding trivial stuff, as opposed to weeding it out later.

But as you suggest elsewhere, we should see how often this check is firing.