new features: cancel download on stop, pseudo streaming

Code is verified using www.jshint.com

I hope my patch is common enough for upstream ;-)