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