simplify OPAM pinning for developers
add several functions

- Deferred.Or_error.List: map, iter
- In_thread: run
- Reader: contents, file_contents, file_lines
- Sys: getenv, file_exists
- Unix: getcwd, rename, getpid, and type file_perm