libc: add Genode::Lock to File_descriptor class

This lock is needed to prevent multiple threads and/or multiple
libc-plugins from using the same file descriptor in p{read,write}.

Fixes #948.
libc: use File_descriptor::lock in pread/pwrite

Replace the static lock with the file descriptor lock because recursive
calls of p{read,write} would result in a deadlock when using multiple
libc-plugins at the same time.

Fixes #948.