Use a nicer progress bar if possible

Here's an alternative to #2229 which detects which bar to use based on the capabilities of stdout. This I think gives us the best of both worlds since it will attempt to use the nicer bar by default, but will fallback and assume that it won't work unless it can successfully encode characters using the encoding of the file the progress bar is printing to.

I have no idea if this works on Windows (or if Windows even shows the progress bar at all) so hopefully @pfmoore can be insightful here.

Example:

![pip-progress](https://cloud.githubusercontent.com/assets/145979/5506895/49b49fc4-876c-11e4-8849-0398a53a33d0.png)

Closes #2229 
Fixed!