Teach Repository.Clone to accept a specific branch to checkout

Manual merge of #650
Yeah - that is what I meant by the "where possible". If we are testing code paths through the networking code, go through the network. If we are testing features that do not rely on the networking functionality, let's prefer a local only test.