Move checking of waitpid() child status into wait_for_child_process().

Also, wait_for_child_process() now returns an error message.

Added pipe_close_readable_fd() and pipe_close_writable_fd() functions and
closing a pipe struct now checks for EINTR.

Added upper_case_string() to base/strings.h to support formatting error
message for wait_for_child_process().