Clean up demo_mandelbrot.py

Restore Python 3 compatibility; Apply PEP8 and PyFlakes; Remove unused imports.