Teach Repository.Clone to accept a specific branch to checkout

Manual merge of #650
If possible, would it be preferable to test this with a local clone instead? We are adding more tests that hit the network, and I wonder if we should prefer local tests where possible.