Codequality, PEP8 cleanup

As we did before releasing 0.7.2 we could take the opportunity to clean up the code base before 0.7.3. I checked this manually and unmade any undesired changes introduced by the script.

```
# pep8 clean up with a modified copy of pep8.py that allows
# whitespace after ':' and arbitrary spacing around '*', '**', '/', and '//'.
autopep8.py -i -r --ignore=E124,E128,E201,E202,E501 sympy
```

Here's a list of ignored rules:

E124 closing bracket does not match visual indentation
E128 continuation line under-indented for visual indent
E201 whitespace after '(', '[', and '{'
E202 whitespace before '}', ']', and ')'
E501 line too long