Use system libuv when conf-libuv is available
conf-libuv is now an optional dependency, and if installed then the system libuv will be used instead of the vendored build, by default.
This provides a more convenient way to control how luv is built. This can still be overridden by setting: LUV_USE_SYSTEM_LIBUV=no.
The bash commands and configure scripts required to build luv from source are not very portable, and as seen in #162, they don't work properly on Windows without additional setup. This patch useful for projects that run on windows, as they can simply add conf-libuv to their dependencies to use the system version, without needing manual intervention every time dependencies are installed/updated.
It would be better to move the jbuild plugin stuff to use dune-configurator instead so the intermediate environment variable can be avoided, however, moving to that would require include support in (install (files ...)), and updating to the required dune version breaks %{lib:ctypes:.}. It looks like the only way to deal with the ctypes issue is to use the builtin ctypes integration in dune.
Also, when moving everything to dune-configurator, I can't think of a way to dynamically add (foreign_archives uv) based on this configuration. Variables don't work in foreign_archives, and I can't figure out how to get the ocaml code in src/c/dune to check the dune-configurator generated files.
I think using an environment variable like this is the best solution for now, and if dune support is improved in future then this can be changed to use dune-configurator instead.