Converted "0install select" to OCaml

Note that this is just the parsing and output parts. Downloading and
solving are still delegated to the Python.