System: fix error type of `file_tree`
File_lock: add new module with 4 functions

The functions are:

- lock
- unlock
- do_with_lock
- do_with_locks

the aim is to implement NFS-compliant locks.
test.file_lock: add preliminary testing of File_lock
test.file_lock: add better tests of do_with_locks
File_lock: add function with_lock
File_lock: rename do_with_lock to with_lock_gen
File_lock: rename do_with_locks to with_locks_gen
File_lock: add function with_locks
System: bypass MacOSX `mkdir` bug

The bug is described in this issue for core:
https://github.com/janestreet/core/issues/7
System: bypass MacOSX bug again
File_lock: improve documentation
sys_test: fix GNU-ism of `ls <wrong path>`
build: remove options '-warn-error A' and '-g'
Merge development branch 'file_locks'