Update DIMACS parsing algorithms

Now supports both "cnf" and "sat" formats. The error handling still
leaves much to be desired, and I still need to add test cases.

I'm not an expert in parsing methodologies, so I just used a regex-based
lexical tokenizer from the Python standard library combined with a
top-down parsing methodology. The 'cnf' format doesn't require a stack,
but the 'sat' format does.