ocamlbuild: use sets rather than list for cycle-checking
ocamlbuild: use sets rather than list for cycle-checking

I'm worried the previous algorithmically-naive implementation may
behave badly on larger-scale projects. We still keep a list around to
return results in the exact same order as previously.

git-svn-id: e7e61699ce1738538ffebb75374fbea0924bc775@15694 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02

msprotz/ocaml,msprotz/ocaml,gerdstolpmann/ocaml,eliberis/ocaml,eliberis/ocaml,yunxing/ocaml,msprotz/ocaml,msprotz/ocaml,yunxing/ocaml,gerdstolpmann/ocaml,eliberis/ocaml,gerdstolpmann/ocaml,gerdstolpmann/ocaml,msprotz/ocaml,yunxing/ocaml,yunxing/ocaml,eliberis/ocaml,eliberis/ocaml,gerdstolpmann/ocaml,yunxing/ocaml