[downloader/(common/http)] Fix calculation of rate-limit. (Fix #...

__Preconditions:__
- "-r, --rate-limit" is set to a small value.
- "--no-resize-buffer" is not set (by default)

__What was the problem:__
In /downloader/http.py (main download loop):
The calculation of the new block_size (resize-buffer) took place before the slow_down() method was called and the time measurement only observed the actual download and not the time spent in slow_down(). So the best_block_size() method thought, that the block size was far too small and doubled the block size in every iteration of the main loop.

__Effect on other functions:__
In order to compensate the exponentially growing block size, the slow_down() method doubled the sleep time in every iteration.

__What was the result:__
- Bursty download (while not downloading most of the time)
- Download timeouts / aborts
- Inresponsive interface
- Wrong calculation of current speed

__Fix:__
- Changed execution order of most of the functions in the main loop. (especially slow_down() and best_block_size())
- Measuring time over the whole loop body

__Additional changes:__
- Synchronized all methods (slow_down(), best_block_size(), calc_speed(), calc_percent()) in the main loop by using the same time measurement variables, to get a more precise result.
- Changed signature of slow_down() to be able to pass a "now" variable. (used for sync) -^
- Simplyfied the calculation of the sleep time in slow_down()
- Added more comments
- Fixed some pep8 warnings

After all, this schould resolve the following issues:
(fix #2297, fix #2140, fix #595, fix #2370, fix #1253)