bin/pkill: Fix {pgrep,pkill}-j_test.sh
The POSIX sh case statement does not allow for pattern matching using the
regex + qualifier so this case statement never matches. Instead just check
for a string starting with a digit followed by any character.
While touching these files also fix various shellcheck warnings.
kyua -v parallelism=4 test failed before, succeeds now.
Reviewed By: imp
Differential Revision: https://reviews.freebsd.org/D28480
(cherry picked from commit 5ff2e55e0071dabbf18cdbe13a1230822d1270d4)