fix double episode download bug

steps to reproduce:
0) have update setting on "download immediately"
1) when a new episode starts downloading
2) pause and then resume the download
3) manually update the podcast

result: a duplicate download task gets added/queued, can lead to corrupt
downloads.

there are other circumstances that can trigger the bug, but this one is
simplest/most reliable to reproduce.

while i can't claim to understand all of the download-handling code,
this seems (more) correct, and fixes the problem.

note: if the code looks confusing, the git diff patch just came out
weird -- compare the "before" and "after" files manually..
Merge pull request #107 from zombie/downloads

fix some download-related bugs