Fix progress percent computation.

Shamelessly stolen from python-apt TextProgress class
Fix flakyness in Travis CI

python-apt doesn't always send 100% install done callback
The 5s threshold isn't enough, push it to 10