In the process on general clone bundle automatically, we need to make some
function available more widely. This is a good opportunity to extract a
significant amount of code from mercurial.exchange into a new
mercurial.bundlecaches. This make mercurial.exchange move under the 3K line
The module is called bundlecaches because I expect it to be eventually useful
for more than just clone bundle (like pull bunbles).