pwait: Fix timeout unit parser
The timeout parser would check the first character after the number and
ignore any subsequent ones.
While here, switch to bool for booleans and fix some style nits.
MFC after: 1 week
Reviewed by: 0mp, markj
Differential Revision: https://reviews.freebsd.org/D52612
(cherry picked from commit 3aac05f56620712744cb57d71a0ef42f8d8e3b52)