re-did resolution code to use State; cleaned up stuff.

been spending some serious time figuring out scalaz. got a handle on how
the whole State thing works, and used that to fix up the resolution
code. this, along with the implementation of some Monoid instances for
some classes used for resolution, allowed me to clean up things quite a
bit. most of the key parts of the Resolution code are represented by
clean and hopefully easy to understand comprehensions.

the real purpose of the whole State transforms code, though, was so that
I could set up a guard on the resolution loop - it prevents there from
being more than, say, 100 iterations. hopefully this will actually solve
the bug it's meant to (ref #1), but even if not, it was some fun work.

furthermore, I went through, documenting as much of the code as I could.
this has allowed me to figure out where all the exceptions come from and
set up a Validation comprehension at the resolution system entry point.
this is much cleaner, and easier to understand.

(monoids are useful when combined with the boolean syntax extentions.)

also cleaned up bits of code here and there in the rest of the system.
I'm also getting ready for the final push to get everything documented.

(still have one last issue to try to fix before I'm ready to hit the
cluster again - scoobi seems to have once again decided that the
conversion to CNF operations belong in reduce stages.)