Re-enabled read locks

The part that needed fixing for the tests was that some 'switch' commands
were keeping a global lock for package installs. They now properly relax to
a switch lock once the global operations are done, before getting to package
installs
Merge pull request #1507 from OCamlPro/read-locks

Re-enabled read locks