[libc] [UnitTest] Add timeout to death tests
This patch adds a timeout of 500ms to death tests. As we add multithreaded code and locks, deadlocks become more likely so timeout will be useful.
- Better error handling in invokeSubprocess
- Makes ProcessStatus's methods const
Reviewers: sivachandra, MaskRay, gchatelet, PaulkaToast
Reviewed By: sivachandra, PaulkaToast
Subscribers: tschuett, libc-commits
Differential Revision: https://reviews.llvm.org/D75651