Change progress emitter

1. Do not use cached value for BytesCompleted
2. Refactor JS a bit
3. Allow disabling progress emitter