time(3): Optimize tvtohz() function.
List of changes:
- Use integer multiplication instead of long multiplication, because the result is an integer.
- Remove multiple if-statements and predict new if-statements.
- Rename local variable name, "ticks" into "retval" to avoid shadowing
the system "ticks" global variable.
Reviewed by: kib@ and imp@
Sponsored by: NVIDIA Networking
Differential Revision: https://reviews.freebsd.org/D36859
(cherry picked from commit 35a33d14b593ba93feb8fed8d0689bc8e0edd15b)