[youtube] improved decrypt_signature, closes #1060

Code taken from https://github.com/rg3/youtube-dl/issues/1060 comments