py: Generalise and reduce code size of array +, += and .extend().
py: Generalise and reduce code size of array +, += and .extend().

By using the buffer protocol for these array operations, we now allow
addition of memoryview objects, and objects with "incompatible"
typecodes (in this case it just adds bytes naively).  This is an
extension to CPython which seems sensible.  It also reduces the code
size.

dxxb/micropython,MrSurly/micropython-esp32,utopiaprince/micropython,bvernoux/micropython,dhylands/micropython,cwyark/micropython,rubencabrera/micropython,kerneltask/micropython,adafruit/micropython,blmorris/micropython,dinau/micropython,vriera/micropython,ahotam/micropython,feilongfl/micropython,bvernoux/micropython,pramasoul/micropython,turbinenreiter/micropython,redbear/micropython,bvernoux/micropython,dmazzella/micropython,trezor/micropython,dmazzella/micropython,paul-xxx/micropython,henriknelson/micropython,xuxiaoxin/micropython,kostyll/micropython,adafruit/circuitpython,martinribelotta/micropython,neilh10/micropython,swegener/micropython,PappaPeppar/micropython,alex-robbins/micropython,neilh10/micropython,SHA2017-badge/micropython-esp32,warner83/micropython,paul-xxx/micropython,aethaniel/micropython,martinribelotta/micropython,ericsnowcurrently/micropython,lbattraw/micropython,xuxiaoxin/micropython,SungEun-Steve-Kim/test-mp,vitiral/micropython,TDAbboud/micropython,chrisdearman/micropython,cloudformdesign/micropython,redbear/micropython,PappaPeppar/micropython,puuu/micropython,ruffy91/micropython,AriZuu/micropython,toolmacher/micropython,omtinez/micropython,mpalomer/micropython,Vogtinator/micropython,dhylands/micropython,danicampora/micropython,vitiral/micropython,infinnovation/micropython,selste/micropython,tobbad/micropython,noahchense/micropython,xhat/micropython,vriera/micropython,blmorris/micropython,adafruit/circuitpython,deshipu/micropython,jimkmc/micropython,SungEun-Steve-Kim/test-mp,skybird6672/micropython,mpalomer/micropython,mgyenik/micropython,pozetroninc/micropython,xhat/micropython,ruffy91/micropython,slzatz/micropython,SungEun-Steve-Kim/test-mp,galenhz/micropython,warner83/micropython,tralamazza/micropython,dmazzella/micropython,ceramos/micropython,MrSurly/micropython,mhoffma/micropython,warner83/micropython,cnoviello/micropython,MrSurly/micropython-esp32,lowRISC/micropython,matthewelse/micropython,selste/micropython,oopy/micropython,ahotam/micropython,ceramos/micropython,trezor/micropython,oopy/micropython,jmarcelino/pycom-micropython,supergis/micropython,misterdanb/micropython,xuxiaoxin/micropython,blazewicz/micropython,alex-march/micropython,adamkh/micropython,pfalcon/micropython,swegener/micropython,tdautc19841202/micropython,ernesto-g/micropython,praemdonck/micropython,supergis/micropython,jmarcelino/pycom-micropython,selste/micropython,misterdanb/micropython,hosaka/micropython,danicampora/micropython,feilongfl/micropython,paul-xxx/micropython,tobbad/micropython,ChuckM/micropython,hiway/micropython,HenrikSolver/micropython,rubencabrera/micropython,orionrobots/micropython,alex-robbins/micropython,Peetz0r/micropython-esp32,supergis/micropython,Vogtinator/micropython,slzatz/micropython,matthewelse/micropython,blazewicz/micropython,PappaPeppar/micropython,heisewangluo/micropython,ahotam/micropython,ChuckM/micropython,torwag/micropython,ganshun666/micropython,ChuckM/micropython,alex-march/micropython,kostyll/micropython,oopy/micropython,drrk/micropython,ericsnowcurrently/micropython,MrSurly/micropython,vriera/micropython,EcmaXp/micropython,ganshun666/micropython,TDAbboud/micropython,KISSMonX/micropython,SHA2017-badge/micropython-esp32,paul-xxx/micropython,deshipu/micropython,AriZuu/micropython,henriknelson/micropython,jlillest/micropython,orionrobots/micropython,mianos/micropython,MrSurly/micropython-esp32,Vogtinator/micropython,utopiaprince/micropython,tdautc19841202/micropython,omtinez/micropython,pramasoul/micropython,vitiral/micropython,TDAbboud/micropython,trezor/micropython,firstval/micropython,SHA2017-badge/micropython-esp32,firstval/micropython,noahwilliamsson/micropython,adafruit/micropython,dmazzella/micropython,xhat/micropython,turbinenreiter/micropython,infinnovation/micropython,adamkh/micropython,supergis/micropython,cloudformdesign/micropython,cnoviello/micropython,AriZuu/micropython,ryannathans/micropython,praemdonck/micropython,pramasoul/micropython,adafruit/micropython,ceramos/micropython,ryannathans/micropython,selste/micropython,toolmacher/micropython,henriknelson/micropython,jmarcelino/pycom-micropython,adamkh/micropython,suda/micropython,tuc-osg/micropython,hosaka/micropython,noahwilliamsson/micropython,adafruit/micropython,noahchense/micropython,jimkmc/micropython,ruffy91/micropython,ceramos/micropython,tralamazza/micropython,stonegithubs/micropython,jimkmc/micropython,vriera/micropython,lowRISC/micropython,tuc-osg/micropython,mgyenik/micropython,cwyark/micropython,pfalcon/micropython,henriknelson/micropython,ahotam/micropython,redbear/micropython,heisewangluo/micropython,dinau/micropython,puuu/micropython,orionrobots/micropython,rubencabrera/micropython,Peetz0r/micropython-esp32,alex-robbins/micropython,supergis/micropython,deshipu/micropython,dinau/micropython,misterdanb/micropython,galenhz/micropython,xyb/micropython,mianos/micropython,trezor/micropython,ericsnowcurrently/micropython,henriknelson/micropython,lbattraw/micropython,ernesto-g/micropython,pozetroninc/micropython,PappaPeppar/micropython,tdautc19841202/micropython,vitiral/micropython,PappaPeppar/micropython,MrSurly/micropython,puuu/micropython,praemdonck/micropython,torwag/micropython,SungEun-Steve-Kim/test-mp,TDAbboud/micropython,mgyenik/micropython,pfalcon/micropython,lbattraw/micropython,ganshun666/micropython,chrisdearman/micropython,tuc-osg/micropython,martinribelotta/micropython,aethaniel/micropython,aethaniel/micropython,kerneltask/micropython,HenrikSolver/micropython,redbear/micropython,pfalcon/micropython,infinnovation/micropython,xyb/micropython,SHA2017-badge/micropython-esp32,omtinez/micropython,Timmenem/micropython,vriera/micropython,praemdonck/micropython,deshipu/micropython,ericsnowcurrently/micropython,slzatz/micropython,drrk/micropython,Timmenem/micropython,lbattraw/micropython,danicampora/micropython,SungEun-Steve-Kim/test-mp,oopy/micropython,MrSurly/micropython-esp32,cwyark/micropython,ericsnowcurrently/micropython,stonegithubs/micropython,drrk/micropython,Timmenem/micropython,Timmenem/micropython,blazewicz/micropython,KISSMonX/micropython,feilongfl/micropython,MrSurly/micropython,SHA2017-badge/micropython-esp32,adamkh/micropython,hosaka/micropython,tobbad/micropython,alex-robbins/micropython,Vogtinator/micropython,adamkh/micropython,micropython/micropython-esp32,mpalomer/micropython,skybird6672/micropython,dhylands/micropython,ryannathans/micropython,feilongfl/micropython,ruffy91/micropython,xyb/micropython,aethaniel/micropython,matthewelse/micropython,mhoffma/micropython,adafruit/circuitpython,puuu/micropython,toolmacher/micropython,emfcamp/micropython,torwag/micropython,redbear/micropython,dxxb/micropython,tuc-osg/micropython,alex-march/micropython,AriZuu/micropython,dhylands/micropython,KISSMonX/micropython,firstval/micropython,turbinenreiter/micropython,suda/micropython,pramasoul/micropython,KISSMonX/micropython,MrSurly/micropython-esp32,ryannathans/micropython,toolmacher/micropython,xuxiaoxin/micropython,jlillest/micropython,aethaniel/micropython,hiway/micropython,drrk/micropython,omtinez/micropython,Timmenem/micropython,tuc-osg/micropython,MrSurly/micropython,mgyenik/micropython,adafruit/circuitpython,infinnovation/micropython,danicampora/micropython,mhoffma/micropython,blmorris/micropython,torwag/micropython,Peetz0r/micropython-esp32,pramasoul/micropython,xyb/micropython,dxxb/micropython,tralamazza/micropython,pozetroninc/micropython,matthewelse/micropython,neilh10/micropython,HenrikSolver/micropython,cnoviello/micropython,utopiaprince/micropython,tobbad/micropython,emfcamp/micropython,swegener/micropython,micropython/micropython-esp32,cnoviello/micropython,martinribelotta/micropython,HenrikSolver/micropython,cwyark/micropython,hiway/micropython,alex-march/micropython,ernesto-g/micropython,pozetroninc/micropython,EcmaXp/micropython,micropython/micropython-esp32,chrisdearman/micropython,tdautc19841202/micropython,lowRISC/micropython,cloudformdesign/micropython,EcmaXp/micropython,mhoffma/micropython,misterdanb/micropython,firstval/micropython,noahchense/micropython,firstval/micropython,jimkmc/micropython,suda/micropython,neilh10/micropython,Peetz0r/micropython-esp32,rubencabrera/micropython,tralamazza/micropython,Vogtinator/micropython,xuxiaoxin/micropython,kerneltask/micropython,mianos/micropython,orionrobots/micropython,skybird6672/micropython,chrisdearman/micropython,ruffy91/micropython,rubencabrera/micropython,alex-robbins/micropython,hosaka/micropython,pfalcon/micropython,swegener/micropython,oopy/micropython,pozetroninc/micropython,EcmaXp/micropython,puuu/micropython,stonegithubs/micropython,omtinez/micropython,utopiaprince/micropython,dxxb/micropython,selste/micropython,emfcamp/micropython,infinnovation/micropython,ahotam/micropython,warner83/micropython,lbattraw/micropython,KISSMonX/micropython,orionrobots/micropython,heisewangluo/micropython,mpalomer/micropython,kostyll/micropython,ernesto-g/micropython,drrk/micropython,blmorris/micropython,HenrikSolver/micropython,Peetz0r/micropython-esp32,martinribelotta/micropython,kostyll/micropython,noahchense/micropython,adafruit/circuitpython,cnoviello/micropython,bvernoux/micropython,chrisdearman/micropython,jmarcelino/pycom-micropython,paul-xxx/micropython,warner83/micropython,tobbad/micropython,turbinenreiter/micropython,torwag/micropython,mianos/micropython,stonegithubs/micropython,mhoffma/micropython,kerneltask/micropython,galenhz/micropython,blazewicz/micropython,jlillest/micropython,cloudformdesign/micropython,micropython/micropython-esp32,noahwilliamsson/micropython,ganshun666/micropython,praemdonck/micropython,micropython/micropython-esp32,EcmaXp/micropython,mpalomer/micropython,stonegithubs/micropython,jimkmc/micropython,ceramos/micropython,deshipu/micropython,mgyenik/micropython,ryannathans/micropython,misterdanb/micropython,dhylands/micropython,vitiral/micropython,kerneltask/micropython,TDAbboud/micropython,cwyark/micropython,trezor/micropython,galenhz/micropython,cloudformdesign/micropython,blmorris/micropython,toolmacher/micropython,ernesto-g/micropython,blazewicz/micropython,hiway/micropython,xyb/micropython,xhat/micropython,bvernoux/micropython,danicampora/micropython,feilongfl/micropython,lowRISC/micropython,lowRISC/micropython,adafruit/circuitpython,hiway/micropython,heisewangluo/micropython,slzatz/micropython,alex-march/micropython,ganshun666/micropython,skybird6672/micropython,hosaka/micropython,ChuckM/micropython,kostyll/micropython,tdautc19841202/micropython,AriZuu/micropython,heisewangluo/micropython,emfcamp/micropython,slzatz/micropython,galenhz/micropython,xhat/micropython,dinau/micropython,jlillest/micropython,neilh10/micropython,emfcamp/micropython,matthewelse/micropython,noahwilliamsson/micropython,suda/micropython,mianos/micropython,suda/micropython,skybird6672/micropython,ChuckM/micropython,noahchense/micropython,matthewelse/micropython,jlillest/micropython,dxxb/micropython,swegener/micropython,noahwilliamsson/micropython,adafruit/micropython,jmarcelino/pycom-micropython,dinau/micropython,utopiaprince/micropython,turbinenreiter/micropython