lockf: switch to strtonum() for parsing timeout
Convert waitsec to a long long to be able to hold the full domain of
alarm(3) timeout on all platforms, and let strtonum(3) handle the input
validation. strtonum(3) also happens to provide a neater interface for
error handling, and it already includes our pre-existing empty input
check.
Sponsored by: Klara, Inc.
(cherry picked from commit e4967d4d48b0a7d873e4f778c0a6e560e09d4dc3)