Dedupe code between google cloud products.

There were a lot of copy/paste errors between google cloud storage and google compute engine. This change extracts the items common between the apis, particularly aspects such as how to specify the default project, and how list page works.