Reduce overhead of operf waiting for profiled app to end
The original implementation was very inefficient in how operf
waited for the profiled app to end. We reduce much of the overhead
by doing a nanosleep for 100 ms, waking up, checking the status
of the app (via waitpid), and going back to sleep again if the app
is still running.
Signed-off-by: Maynard Johnson <email@example.com>