Make rootUrl/basePath two optional arguments to API classes

This allows one to easily override the URI endpoint where the API will be
available.

R=sgjesse@google.com, wibling@google.com

Review URL: https://codereview.chromium.org//774193002