BUG: disable garbage collector during memory allocation hook
BUG: disable garbage collector during memory allocation hook

When a cython object contains numpy arrays the pure python allocation
hook can trigger during cythons __dealloc__ method and trigger a second
deletion of the object currently being deleted.
To minimize the probabily that that happens disable the garbage
collector during the hook.
As this involves python calls it is still possible that a double delete
occurs but chances are lowered, a proper solution would be C only hook
like python 3.4 tracemalloc module.

Closes gh-4834

joferkington/numpy,ESSS/numpy,mattip/numpy,Srisai85/numpy,moreati/numpy,ChanderG/numpy,seberg/numpy,WarrenWeckesser/numpy,stuarteberg/numpy,musically-ut/numpy,bertrand-l/numpy,WarrenWeckesser/numpy,rhythmsosad/numpy,joferkington/numpy,maniteja123/numpy,njase/numpy,rajathkumarmp/numpy,sonnyhu/numpy,shoyer/numpy,jakirkham/numpy,hainm/numpy,GaZ3ll3/numpy,ekalosak/numpy,sigma-random/numpy,rgommers/numpy,yiakwy/numpy,kiwifb/numpy,SunghanKim/numpy,leifdenby/numpy,pizzathief/numpy,cjermain/numpy,jorisvandenbossche/numpy,naritta/numpy,ajdawson/numpy,jonathanunderwood/numpy,numpy/numpy,rhythmsosad/numpy,nbeaver/numpy,Srisai85/numpy,BabeNovelty/numpy,Yusa95/numpy,behzadnouri/numpy,brandon-rhodes/numpy,jonathanunderwood/numpy,ahaldane/numpy,mhvk/numpy,argriffing/numpy,chatcannon/numpy,githubmlai/numpy,pbrod/numpy,tacaswell/numpy,jankoslavic/numpy,rherault-insa/numpy,b-carter/numpy,dato-code/numpy,larsmans/numpy,behzadnouri/numpy,dch312/numpy,MSeifert04/numpy,ahaldane/numpy,anntzer/numpy,jschueller/numpy,dimasad/numpy,dato-code/numpy,rmcgibbo/numpy,bmorris3/numpy,SunghanKim/numpy,b-carter/numpy,rajathkumarmp/numpy,Eric89GXL/numpy,jankoslavic/numpy,mortada/numpy,grlee77/numpy,Anwesh43/numpy,brandon-rhodes/numpy,GrimDerp/numpy,nguyentu1602/numpy,pizzathief/numpy,tdsmith/numpy,ChristopherHogan/numpy,naritta/numpy,mhvk/numpy,CMartelLML/numpy,cowlicks/numpy,sonnyhu/numpy,simongibbons/numpy,BMJHayward/numpy,trankmichael/numpy,Anwesh43/numpy,ContinuumIO/numpy,SiccarPoint/numpy,GrimDerp/numpy,nbeaver/numpy,mingwpy/numpy,chatcannon/numpy,madphysicist/numpy,trankmichael/numpy,rhythmsosad/numpy,leifdenby/numpy,mindw/numpy,mattip/numpy,ahaldane/numpy,sinhrks/numpy,sonnyhu/numpy,KaelChen/numpy,musically-ut/numpy,rudimeier/numpy,rgommers/numpy,Linkid/numpy,githubmlai/numpy,mathdd/numpy,stuarteberg/numpy,pizzathief/numpy,mhvk/numpy,numpy/numpy,jschueller/numpy,ViralLeadership/numpy,drasmuss/numpy,tacaswell/numpy,bertrand-l/numpy,ContinuumIO/numpy,felipebetancur/numpy,skwbc/numpy,skwbc/numpy,rajathkumarmp/numpy,Eric89GXL/numpy,githubmlai/numpy,SunghanKim/numpy,pizzathief/numpy,GrimDerp/numpy,abalkin/numpy,mathdd/numpy,bringingheavendown/numpy,WarrenWeckesser/numpy,empeeu/numpy,MichaelAquilina/numpy,dch312/numpy,BabeNovelty/numpy,seberg/numpy,pdebuyl/numpy,musically-ut/numpy,jorisvandenbossche/numpy,KaelChen/numpy,kirillzhuravlev/numpy,NextThought/pypy-numpy,rudimeier/numpy,anntzer/numpy,mattip/numpy,mhvk/numpy,simongibbons/numpy,larsmans/numpy,ViralLeadership/numpy,Dapid/numpy,rajathkumarmp/numpy,ssanderson/numpy,brandon-rhodes/numpy,bringingheavendown/numpy,mwiebe/numpy,ContinuumIO/numpy,simongibbons/numpy,bertrand-l/numpy,has2k1/numpy,SiccarPoint/numpy,tacaswell/numpy,dimasad/numpy,rherault-insa/numpy,pizzathief/numpy,rmcgibbo/numpy,ChanderG/numpy,mingwpy/numpy,ddasilva/numpy,madphysicist/numpy,jankoslavic/numpy,njase/numpy,chatcannon/numpy,tdsmith/numpy,leifdenby/numpy,jakirkham/numpy,joferkington/numpy,KaelChen/numpy,MSeifert04/numpy,gfyoung/numpy,groutr/numpy,dimasad/numpy,CMartelLML/numpy,pdebuyl/numpy,dwillmer/numpy,felipebetancur/numpy,anntzer/numpy,argriffing/numpy,grlee77/numpy,MaPePeR/numpy,tdsmith/numpy,MaPePeR/numpy,grlee77/numpy,charris/numpy,WillieMaddox/numpy,stuarteberg/numpy,dwillmer/numpy,andsor/numpy,sinhrks/numpy,maniteja123/numpy,stuarteberg/numpy,ajdawson/numpy,SiccarPoint/numpy,groutr/numpy,grlee77/numpy,endolith/numpy,ESSS/numpy,NextThought/pypy-numpy,simongibbons/numpy,rudimeier/numpy,mortada/numpy,gmcastil/numpy,mwiebe/numpy,mindw/numpy,endolith/numpy,kirillzhuravlev/numpy,ChristopherHogan/numpy,Yusa95/numpy,joferkington/numpy,sinhrks/numpy,BabeNovelty/numpy,argriffing/numpy,pyparallel/numpy,gfyoung/numpy,pyparallel/numpy,mortada/numpy,dato-code/numpy,groutr/numpy,shoyer/numpy,utke1/numpy,simongibbons/numpy,Linkid/numpy,SunghanKim/numpy,mindw/numpy,mingwpy/numpy,charris/numpy,Linkid/numpy,pyparallel/numpy,seberg/numpy,pdebuyl/numpy,grlee77/numpy,mhvk/numpy,ddasilva/numpy,CMartelLML/numpy,pdebuyl/numpy,Eric89GXL/numpy,dimasad/numpy,shoyer/numpy,skymanaditya1/numpy,ekalosak/numpy,sinhrks/numpy,SiccarPoint/numpy,jakirkham/numpy,chiffa/numpy,ddasilva/numpy,mwiebe/numpy,andsor/numpy,MSeifert04/numpy,ekalosak/numpy,skwbc/numpy,hainm/numpy,chiffa/numpy,mattip/numpy,sigma-random/numpy,GrimDerp/numpy,rudimeier/numpy,NextThought/pypy-numpy,mathdd/numpy,ajdawson/numpy,cowlicks/numpy,Dapid/numpy,utke1/numpy,moreati/numpy,MaPePeR/numpy,ajdawson/numpy,madphysicist/numpy,dato-code/numpy,b-carter/numpy,empeeu/numpy,kirillzhuravlev/numpy,cowlicks/numpy,numpy/numpy,ahaldane/numpy,jorisvandenbossche/numpy,gmcastil/numpy,kiwifb/numpy,MichaelAquilina/numpy,jorisvandenbossche/numpy,rgommers/numpy,Yusa95/numpy,MichaelAquilina/numpy,kiwifb/numpy,dwillmer/numpy,ESSS/numpy,KaelChen/numpy,utke1/numpy,AustereCuriosity/numpy,andsor/numpy,dwillmer/numpy,dch312/numpy,ekalosak/numpy,seberg/numpy,GaZ3ll3/numpy,WarrenWeckesser/numpy,mingwpy/numpy,Yusa95/numpy,Linkid/numpy,MSeifert04/numpy,Eric89GXL/numpy,trankmichael/numpy,skymanaditya1/numpy,GaZ3ll3/numpy,naritta/numpy,jakirkham/numpy,BMJHayward/numpy,mortada/numpy,naritta/numpy,githubmlai/numpy,gmcastil/numpy,ChanderG/numpy,solarjoe/numpy,ChristopherHogan/numpy,pbrod/numpy,drasmuss/numpy,WillieMaddox/numpy,ssanderson/numpy,ahaldane/numpy,nguyentu1602/numpy,jonathanunderwood/numpy,WarrenWeckesser/numpy,skymanaditya1/numpy,nbeaver/numpy,Srisai85/numpy,jakirkham/numpy,behzadnouri/numpy,musically-ut/numpy,pbrod/numpy,dch312/numpy,mathdd/numpy,cjermain/numpy,ssanderson/numpy,njase/numpy,Anwesh43/numpy,anntzer/numpy,pbrod/numpy,MichaelAquilina/numpy,rmcgibbo/numpy,Anwesh43/numpy,larsmans/numpy,mindw/numpy,yiakwy/numpy,yiakwy/numpy,WillieMaddox/numpy,has2k1/numpy,larsmans/numpy,tynn/numpy,empeeu/numpy,sonnyhu/numpy,gfyoung/numpy,tynn/numpy,cjermain/numpy,bmorris3/numpy,AustereCuriosity/numpy,hainm/numpy,empeeu/numpy,andsor/numpy,CMartelLML/numpy,has2k1/numpy,abalkin/numpy,MSeifert04/numpy,maniteja123/numpy,endolith/numpy,felipebetancur/numpy,solarjoe/numpy,jschueller/numpy,rgommers/numpy,tynn/numpy,GaZ3ll3/numpy,madphysicist/numpy,numpy/numpy,rherault-insa/numpy,bmorris3/numpy,MaPePeR/numpy,rhythmsosad/numpy,tdsmith/numpy,pbrod/numpy,charris/numpy,chiffa/numpy,bmorris3/numpy,ChanderG/numpy,jankoslavic/numpy,cowlicks/numpy,ChristopherHogan/numpy,drasmuss/numpy,bringingheavendown/numpy,AustereCuriosity/numpy,NextThought/pypy-numpy,cjermain/numpy,BMJHayward/numpy,Dapid/numpy,charris/numpy,brandon-rhodes/numpy,yiakwy/numpy,has2k1/numpy,sigma-random/numpy,nguyentu1602/numpy,endolith/numpy,BMJHayward/numpy,kirillzhuravlev/numpy,rmcgibbo/numpy,moreati/numpy,jschueller/numpy,solarjoe/numpy,jorisvandenbossche/numpy,sigma-random/numpy,hainm/numpy,ViralLeadership/numpy,nguyentu1602/numpy,madphysicist/numpy,shoyer/numpy,abalkin/numpy,trankmichael/numpy,BabeNovelty/numpy,felipebetancur/numpy,skymanaditya1/numpy,shoyer/numpy,Srisai85/numpy