linux(4): Consolidate wait* facility into linux_common_wait().
Also fix bug in waitid() implementation, use wru_self not wru_children.
Differential revision: https://reviews.freebsd.org/D31552
MFC after: 2 weeks
(cherry picked from commit 0c6b1ff7de56ccaef9bb22bacfd69b07ab4aeb8a)