tests: timer_api: avoid compounding errors in imprecise conversions
tests: timer_api: avoid compounding errors in imprecise conversions

When the timer frequency is not a multiple of 1000 converting between
ticks and milliseconds introduces error.  Avoid propagating the error
by converting divided values rather than dividing converted values.

Also compensate for observed rate differences between the busywait
clock and the timeout clock.

Signed-off-by: Peter Bigot <a4112a160b558d5427af084318038e19a95979ee@nordicsemi.no>

galak/zephyr,nashif/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,Vudentz/zephyr,finikorg/zephyr,galak/zephyr,finikorg/zephyr,galak/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,Vudentz/zephyr,Vudentz/zephyr,nashif/zephyr,Vudentz/zephyr,nashif/zephyr