#1866: improved gelbooru support

* support for discontinued sha1 naming scheme
* all redirects to gelbooru will now use danbooru's md5 hashes
* update for aa7a91c98f6a9ca1edbbc331d1e92b16fd2d7cf1