Real read/write locks using Unix.lockf

Ref: #1212 (I still got a Pervasives.exit 64 from Dose: algo/depsolver.ml: the package encoding global constraints can't be in conflict when trying to _display_ the conflicts with internal solver)
Ref: #457 (should be safe to take a read lock until solution application, then a write lock. If this is still needed ; breaks current `make tests`)
Closes #434 completely, as there should not ever be a need to reset locks anymore.
Temporarily disabling read locks

* in `make tests`, the `switch-alias` test calls `opam config` from a package script.
This obviously breaks with a real read lock.
* Test should probably fixed, but mirari may use similar patterns.
Merge pull request #1299 from OCamlPro/unix-lockf

Real read/write locks using Unix.lockf