Access to a synchronizedSet must be synchronized (#28).

Reported by Le Wang <larrie.wang@gmail.com>.

Signed-off-by: Maxime Petazzoni <mpetazzoni@turn.com>
Restrict end-game behavior to end of download

Signed-off-by: Maxime Petazzoni <mpetazzoni@turn.com>