Make crypto-square exercise compatible with Python3

The behavior of str.translate and str(ing).maketrans is
very different in Python3. It turned out to be simpler to
replace the method by a simple custom function (_cleanse).

The other changes were introduced by a run of autopep8.