Add pretty-printer for wait(2) statuses and modernize the code handling them

Summary:
A number of places were trying to decode the result of wait(). Add a simple
utility function that does that and a struct that encapsulates the
decoded result. Then also provide a pretty-printer for that class.

Reviewers: zturner, krytarowski, eugene

Subscribers: lldb-commits, mgorny

Differential Revision: https://reviews.llvm.org/D33998

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@305689 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed