js: use average bitrate for overall progress

Especially when uploading large files with big chunks the bitrate
display and the remaining time display become bumpy. This happens
when an onProgress event is fired while a bigger chunk is processed
at the server as the throughput may be very low at this moment.

Signed-off-by: Peter Lieven <pl@kamp.de>
Can you add line 823 to this as well?