os::killtree() supports case when root pid has exited.

Improve os::killtree() for the case when the root pid has exited and
it has been instructed to either follow process groups or sessions. It
will now kill all processes (and their trees) with pgid or session
matching the root pid.

Review: https://reviews.apache.org/r/27295