[timer] Calculate loops_per_ms and handle loops_per_us == 0
[timer] Calculate loops_per_ms and handle loops_per_us == 0

As discovered from https://github.com/vvaltchev/tilck/issues/74, it is
possible on some emulators to have a vCPU able to do less than 1 million
iterations per second. When that happens, `loops_per_us` is 0 and delay_us()
appears to hang because it starts counting back from 2^31 - 1.

The fix
--------

Since in such cases the vCPU does < 1 million iters / second, we should
not do ANY work in delay_us(u32 us), when us <= 1. But when `us` is big
enough we certainly are expected to burn some cycles in order to time to
pass.

In order to avoid loosing precision, in delay_us() we're going to spin for
`us * loops_per_us` only when loops_per_us >= 10, otherwise we're going
to spin for `(us * loops_per_ms) / 1000`. For example:

	loops_per_ms = 800
	loops_per_us = 0

If us <= 1, we'll return immediately. But if us == 5, we'll spin:

	(5 * 800) / 1000 = 4 times

The same logic is used when loops_per_us is too small (e.g. 5):

	loops_per_ms = 5923
	loops_per_us = 5

With the basic formula `us * loops_per_us`, with `us` == 4, we'll have
to spin for 4 * 5 = 20 iterations, while with the more precise one:

	(4 * 5923) / 1000 = 23

We'll have to spin a bit more.

vvaltchev/experimentOs,vvaltchev/experimentOs,vvaltchev/experimentOs,vvaltchev/experimentOs