os/kernel: Fix os_cputime_ticks_to_usecs
os/kernel: Fix os_cputime_ticks_to_usecs

Function was correctly computing values only when
OS_CPUTIME_FREQ was 32768.
For other values computation could be incorrect depending
on ticks.

Hard-coded mask 0x1FF was only good for 32768.
Now mask is also computed.

mlaz/mynewt-core,mlaz/mynewt-core,mlaz/mynewt-core,mlaz/mynewt-core,mlaz/mynewt-core