kernel/timeout: Don't reset imminent timeouts
kernel/timeout: Don't reset imminent timeouts

The logic in z_set_timeout_expiry() missed the case where the ticks
argument could be zero (or lower), which can happen naturally due to
timing/interrupt slop.  In those circumstances, it would still try to
reset a timer that was "about to expire at the next tick", which would
run afoul of the drivers' internal decisions about how soon a timer
interrupt could be set, and then get pushed out to the next tick.

Explicitly detect this as an "imminent" predicate to make the logic
clearer.

Signed-off-by: Andy Ross <c70f9a6bf6ee0cd69c8af4ce5e6b131945769315@intel.com>

zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,Vudentz/zephyr,Vudentz/zephyr,explora26/zephyr,ldts/zephyr,galak/zephyr,GiulianoFranchetto/zephyr,Vudentz/zephyr,Vudentz/zephyr,finikorg/zephyr,explora26/zephyr,punitvara/zephyr,GiulianoFranchetto/zephyr,ldts/zephyr,finikorg/zephyr,GiulianoFranchetto/zephyr,explora26/zephyr,GiulianoFranchetto/zephyr,GiulianoFranchetto/zephyr,nashif/zephyr,nashif/zephyr,nashif/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,ldts/zephyr,explora26/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,galak/zephyr,punitvara/zephyr,nashif/zephyr,finikorg/zephyr,nashif/zephyr,punitvara/zephyr,galak/zephyr,explora26/zephyr,punitvara/zephyr,Vudentz/zephyr,finikorg/zephyr,ldts/zephyr,punitvara/zephyr,ldts/zephyr,galak/zephyr