Performance improvements of around 10% on the Python (PyPy) suduko solver

The resulting Python is also more idiomatic.