Previously, /proc and /dev pseudo-filesystems were implemented in
completely different ways. This commit introduces a set of generic
functions for all pseudo-FSs (based on previous implementation of
/proc) and refactors both /proc and /dev to use these functions.
This commit also expands a LibOS test `proc` to cover more cases
and pseudo-files, as well as introduces a new LibOS test `dev`.
Several bugs in pseudo-FSs were detected and fixed in the process.