Add download cancelling and exception prevention

Add onStop() method to cancel download tasks when appropriate
Fix runtime exception when user kills the app with the back button