Allow any Google cloud endpoint to be used

The code allow you to load discovery documents from your own Google cloud endpoint.
There was a bug in the code that always assumed that the base url is https://www.googleapis.com and not the one that you used to create the discovery document.