extmod/utime_mphal: Fix implementation of new semantics of ticks_diff().
extmod/utime_mphal: Fix implementation of new semantics of ticks_diff().

Now the function properly uses ring arithmetic to return signed value
in range (inclusive):
[-MICROPY_PY_UTIME_TICKS_PERIOD/2, MICROPY_PY_UTIME_TICKS_PERIOD/2-1].

That means that function can properly process 2 time values away from
each other within MICROPY_PY_UTIME_TICKS_PERIOD/2 ticks, but away in
both directions. For example, if tick value 'a' predates tick value 'b',
ticks_diff(a, b) will return negative value, and positive value otherwise.
But at positive value of MICROPY_PY_UTIME_TICKS_PERIOD/2-1, the result
of the function will wrap around to negative -MICROPY_PY_UTIME_TICKS_PERIOD/2,
in other words, if a follows b in more than MICROPY_PY_UTIME_TICKS_PERIOD/2 - 1
ticks, the function will "consider" a to actually predate b.

alex-robbins/micropython,lowRISC/micropython,chrisdearman/micropython,hiway/micropython,alex-robbins/micropython,swegener/micropython,HenrikSolver/micropython,bvernoux/micropython,pozetroninc/micropython,jmarcelino/pycom-micropython,swegener/micropython,adafruit/micropython,alex-robbins/micropython,kerneltask/micropython,hiway/micropython,tobbad/micropython,HenrikSolver/micropython,jmarcelino/pycom-micropython,pfalcon/micropython,chrisdearman/micropython,Timmenem/micropython,infinnovation/micropython,pozetroninc/micropython,dmazzella/micropython,kerneltask/micropython,matthewelse/micropython,henriknelson/micropython,torwag/micropython,hosaka/micropython,mhoffma/micropython,hiway/micropython,TDAbboud/micropython,alex-robbins/micropython,Peetz0r/micropython-esp32,pfalcon/micropython,tralamazza/micropython,selste/micropython,micropython/micropython-esp32,chrisdearman/micropython,toolmacher/micropython,HenrikSolver/micropython,tralamazza/micropython,alex-robbins/micropython,PappaPeppar/micropython,PappaPeppar/micropython,MrSurly/micropython,SHA2017-badge/micropython-esp32,lowRISC/micropython,tuc-osg/micropython,lowRISC/micropython,lowRISC/micropython,kerneltask/micropython,blazewicz/micropython,bvernoux/micropython,selste/micropython,PappaPeppar/micropython,mhoffma/micropython,selste/micropython,MrSurly/micropython-esp32,toolmacher/micropython,Timmenem/micropython,toolmacher/micropython,ryannathans/micropython,tuc-osg/micropython,torwag/micropython,infinnovation/micropython,selste/micropython,blazewicz/micropython,hosaka/micropython,henriknelson/micropython,HenrikSolver/micropython,Timmenem/micropython,pramasoul/micropython,mhoffma/micropython,matthewelse/micropython,pramasoul/micropython,hiway/micropython,oopy/micropython,micropython/micropython-esp32,cwyark/micropython,infinnovation/micropython,cwyark/micropython,oopy/micropython,chrisdearman/micropython,alex-march/micropython,torwag/micropython,matthewelse/micropython,adafruit/circuitpython,PappaPeppar/micropython,trezor/micropython,MrSurly/micropython-esp32,torwag/micropython,deshipu/micropython,AriZuu/micropython,puuu/micropython,alex-march/micropython,mhoffma/micropython,AriZuu/micropython,blazewicz/micropython,alex-march/micropython,adafruit/circuitpython,toolmacher/micropython,TDAbboud/micropython,jmarcelino/pycom-micropython,MrSurly/micropython,SHA2017-badge/micropython-esp32,dmazzella/micropython,pfalcon/micropython,adafruit/circuitpython,Timmenem/micropython,ryannathans/micropython,infinnovation/micropython,pozetroninc/micropython,TDAbboud/micropython,oopy/micropython,AriZuu/micropython,deshipu/micropython,pozetroninc/micropython,oopy/micropython,selste/micropython,alex-march/micropython,HenrikSolver/micropython,MrSurly/micropython-esp32,puuu/micropython,alex-march/micropython,ryannathans/micropython,torwag/micropython,mhoffma/micropython,pramasoul/micropython,swegener/micropython,adafruit/micropython,MrSurly/micropython-esp32,adafruit/micropython,blazewicz/micropython,cwyark/micropython,MrSurly/micropython,MrSurly/micropython,adafruit/micropython,swegener/micropython,oopy/micropython,MrSurly/micropython,tuc-osg/micropython,Peetz0r/micropython-esp32,hosaka/micropython,deshipu/micropython,MrSurly/micropython-esp32,henriknelson/micropython,kerneltask/micropython,micropython/micropython-esp32,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,dmazzella/micropython,bvernoux/micropython,kerneltask/micropython,trezor/micropython,tobbad/micropython,TDAbboud/micropython,swegener/micropython,ryannathans/micropython,micropython/micropython-esp32,tuc-osg/micropython,deshipu/micropython,pozetroninc/micropython,PappaPeppar/micropython,deshipu/micropython,tralamazza/micropython,puuu/micropython,SHA2017-badge/micropython-esp32,adafruit/circuitpython,trezor/micropython,infinnovation/micropython,tobbad/micropython,SHA2017-badge/micropython-esp32,trezor/micropython,pramasoul/micropython,matthewelse/micropython,jmarcelino/pycom-micropython,trezor/micropython,micropython/micropython-esp32,tuc-osg/micropython,tobbad/micropython,pfalcon/micropython,dmazzella/micropython,AriZuu/micropython,lowRISC/micropython,pramasoul/micropython,cwyark/micropython,hosaka/micropython,toolmacher/micropython,bvernoux/micropython,puuu/micropython,AriZuu/micropython,tobbad/micropython,TDAbboud/micropython,ryannathans/micropython,henriknelson/micropython,hosaka/micropython,bvernoux/micropython,Peetz0r/micropython-esp32,hiway/micropython,chrisdearman/micropython,puuu/micropython,tralamazza/micropython,blazewicz/micropython,SHA2017-badge/micropython-esp32,henriknelson/micropython,cwyark/micropython,jmarcelino/pycom-micropython,matthewelse/micropython,Peetz0r/micropython-esp32,Timmenem/micropython,Peetz0r/micropython-esp32,pfalcon/micropython,matthewelse/micropython