Add kill_and_wait().

This will gracefully kill all pids passed in and wait
the specified time before force killing them with
SIGKILL.
Use kill_and_wait() 30 in parallel_shutdown.

This fixes all of the 'Killed' and 'Error getting PKGNAME'
spam when an error is encountered looking up dependencies
or origins are being parsed.