new features: cancel download on stop, pseudo streaming

Code is verified using www.jshint.com

I hope my patch is common enough for upstream.
Sorry, created a wrong pull request to the master branch before..