Allow to specify LIBDIR, BINDIR and PKGDIR at configuration time

Would be better to rewrite all the configuration scripts from scratch, but well ...

To be able to do something like https://github.com/ocaml/opam-repository/pull/2023/files#diff-723ac13d2cd18792d857888b700d9854R6