Fix Process unittests.

The unused file descriptor tests were flaky because they had a 10ms
sleep were the child process was supposed to run. While 10ms is
typically enough for that, our builders run at a high load at 10ms
could not be enough.

This patch uses a different approach to test the same behavior by
checking if the file descriptors are available from the same child
process. It also fixes a fd leak by used a ScopedPipe.

Bug: None
TEST=FEATURES=test emerge-link libbrillo

Change-Id: I53d529c5dbebbfa1af4cc858d76a200d3344d3ff
5 files changed