py/modthread: Use system-provided mutexs for _thread locks.
py/modthread: Use system-provided mutexs for _thread locks.

It's more efficient using the system mutexs instead of synthetic ones with
a busy-wait loop.  The system can do proper scheduling and blocking of the
threads waiting on the mutex.

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