Fixed FTP download and upload file sizes being limited by available RAM ...

...(#565).
I'd also use condition variables. @Bromeon mentioned complicated code paths, and `return` and friends do exactly break those paths. I rather like to have one starting and one ending point.