Moved code to find archive mirror URL to OCaml

Note: this adds a dependency on the ocurl library.