Move handling of remote APIs out of RepoApi

Change-Id: I99c656f11ec636d879b84c3f2d88983a8d239f45
Merge "Move handling of remote APIs out of RepoApi"