C++ support to return additional status information from Wait and WaitMany.

R=viettrungluu@chromium.org
BUG=365436

Review URL: https://codereview.chromium.org/776283003