Tidied up Decipher method

Moved duplicated code into a method, loop breakout added if all three
cipher methods are found.
From previous commit, restored original DownloadURLResolver.cs as the
methods need to remain the same.