Teach Repository.Clone to accept a specific branch to checkout

Manual merge of #650
For the most part, we should be testing both, since local repository access bypasses the code we use to talk to network remotes, but in this case it should be fine to test against a local repository.