Pyflakes fixes for various parts of SymPy.

I plan to continue work on this, but feel free to review and merge at any
time.