Add support for secure distribution and cdn_subdomain

Based on the [following response](http://support.cloudinary.com/entries/25445341-Subdomain-and-ssl-certificate) from the cloudinary team implemented different scheme for subdomain mapping when using https. 
Allows to avoid certificate errors when accessing images due to lack of second level domain in akamai cloudinary SSL certificate.