Fix Dimacs tests.

Figured out the problem with Dimacs tests. When creating the list of variables of a CNF, ids are assigned in the order they appear in the list of given clauses. Therefore, for the Dimacs operation to have a well-defined inverse, the variables must be ordered beforehand. 

It is a design decision whether cnfgen should order the variables itself. In other words, should cnf([(True,"x2"),(False,"x1")]).dimacs()  be "2 -1 0" or "1 -2 0"?