Generate URL for a Taskcluster api reference.

def api_reference(root_url, service, version):
    """Generate URL for a Taskcluster api reference."""
    root_url = root_url.rstrip('/')
    if root_url == OLD_ROOT_URL:
        return 'https://references.taskcluster.net/{}/{}/api.json'.format(service, version)
    else:
        return '{}/references/{}/{}/api.json'.format(root_url, service, version)