Make the progressbar graphically more pleasing.

Now it is an actual progressbar. It uses the '\r' character
in order to erase the entire line before each update.

It works in the IPython notebook as well.

Tested in 3.4. It should work in 2.7. Not sure about 2.6 (because of // division operator?)