Replace global state with a class

Now instead of setting the max variable, you just instantiate a class
Clauses. This also makes the API simpler in that each function (now a method
of Clauses) just returns a literal (or true or false), and appends new clauses
to Clauses.clauses.