BUG: slow down with p=np.inf in 0.17 cKDTree.query
BUG: slow down with p=np.inf in 0.17 cKDTree.query

np.inf was not properly special cased, and pow(x, inf)
[ very slow on most libm, apparently] is used.
Likley fixes #5953

rgommers/scipy,Newman101/scipy,scipy/scipy,aarchiba/scipy,aeklant/scipy,Stefan-Endres/scipy,jamestwebber/scipy,matthewalbani/scipy,anntzer/scipy,behzadnouri/scipy,mdhaber/scipy,Newman101/scipy,aarchiba/scipy,woodscn/scipy,endolith/scipy,bkendzior/scipy,apbard/scipy,bkendzior/scipy,befelix/scipy,maniteja123/scipy,person142/scipy,jakevdp/scipy,dominicelse/scipy,gdooper/scipy,apbard/scipy,dominicelse/scipy,endolith/scipy,anntzer/scipy,jakevdp/scipy,kleskjr/scipy,e-q/scipy,gdooper/scipy,jjhelmus/scipy,perimosocordiae/scipy,Newman101/scipy,mdhaber/scipy,scipy/scipy,aarchiba/scipy,pbrod/scipy,nmayorov/scipy,kleskjr/scipy,matthew-brett/scipy,haudren/scipy,surhudm/scipy,maniteja123/scipy,nonhermitian/scipy,andyfaff/scipy,grlee77/scipy,rgommers/scipy,anielsen001/scipy,surhudm/scipy,woodscn/scipy,mikebenfield/scipy,mdhaber/scipy,kalvdans/scipy,jor-/scipy,pyramania/scipy,e-q/scipy,anielsen001/scipy,andyfaff/scipy,Eric89GXL/scipy,gdooper/scipy,pbrod/scipy,perimosocordiae/scipy,aarchiba/scipy,jakevdp/scipy,maniteja123/scipy,person142/scipy,haudren/scipy,nmayorov/scipy,kalvdans/scipy,pschella/scipy,woodscn/scipy,maniteja123/scipy,scipy/scipy,WarrenWeckesser/scipy,nonhermitian/scipy,kalvdans/scipy,Newman101/scipy,grlee77/scipy,anielsen001/scipy,gertingold/scipy,pizzathief/scipy,WarrenWeckesser/scipy,arokem/scipy,matthewalbani/scipy,jamestwebber/scipy,pschella/scipy,person142/scipy,argriffing/scipy,WarrenWeckesser/scipy,surhudm/scipy,scipy/scipy,jor-/scipy,anielsen001/scipy,ilayn/scipy,perimosocordiae/scipy,perimosocordiae/scipy,josephcslater/scipy,WarrenWeckesser/scipy,mdhaber/scipy,ilayn/scipy,Stefan-Endres/scipy,gertingold/scipy,arokem/scipy,zerothi/scipy,pyramania/scipy,lhilt/scipy,zerothi/scipy,andyfaff/scipy,kleskjr/scipy,Eric89GXL/scipy,arokem/scipy,argriffing/scipy,argriffing/scipy,pizzathief/scipy,WarrenWeckesser/scipy,person142/scipy,nonhermitian/scipy,surhudm/scipy,Eric89GXL/scipy,jjhelmus/scipy,WarrenWeckesser/scipy,apbard/scipy,nmayorov/scipy,tylerjereddy/scipy,gfyoung/scipy,jor-/scipy,woodscn/scipy,grlee77/scipy,pschella/scipy,gdooper/scipy,scipy/scipy,lhilt/scipy,nonhermitian/scipy,bkendzior/scipy,Newman101/scipy,behzadnouri/scipy,person142/scipy,tylerjereddy/scipy,lhilt/scipy,kleskjr/scipy,haudren/scipy,zerothi/scipy,josephcslater/scipy,aeklant/scipy,endolith/scipy,jor-/scipy,argriffing/scipy,mikebenfield/scipy,anntzer/scipy,perimosocordiae/scipy,maniteja123/scipy,behzadnouri/scipy,jjhelmus/scipy,grlee77/scipy,woodscn/scipy,gfyoung/scipy,rgommers/scipy,behzadnouri/scipy,grlee77/scipy,jjhelmus/scipy,gfyoung/scipy,matthewalbani/scipy,jamestwebber/scipy,jamestwebber/scipy,befelix/scipy,bkendzior/scipy,woodscn/scipy,jakevdp/scipy,lhilt/scipy,vigna/scipy,pbrod/scipy,behzadnouri/scipy,befelix/scipy,pbrod/scipy,aeklant/scipy,Stefan-Endres/scipy,matthew-brett/scipy,jamestwebber/scipy,tylerjereddy/scipy,Stefan-Endres/scipy,e-q/scipy,lhilt/scipy,aeklant/scipy,pschella/scipy,anntzer/scipy,scipy/scipy,pizzathief/scipy,sriki18/scipy,sriki18/scipy,matthew-brett/scipy,vigna/scipy,andyfaff/scipy,Eric89GXL/scipy,zerothi/scipy,mikebenfield/scipy,dominicelse/scipy,befelix/scipy,jjhelmus/scipy,zerothi/scipy,josephcslater/scipy,endolith/scipy,mikebenfield/scipy,sriki18/scipy,matthewalbani/scipy,kalvdans/scipy,gdooper/scipy,pyramania/scipy,pbrod/scipy,Stefan-Endres/scipy,pyramania/scipy,bkendzior/scipy,maniteja123/scipy,anielsen001/scipy,surhudm/scipy,aeklant/scipy,arokem/scipy,Eric89GXL/scipy,rgommers/scipy,ilayn/scipy,sriki18/scipy,anielsen001/scipy,mdhaber/scipy,tylerjereddy/scipy,mikebenfield/scipy,vigna/scipy,vigna/scipy,matthew-brett/scipy,surhudm/scipy,Newman101/scipy,matthew-brett/scipy,perimosocordiae/scipy,nmayorov/scipy,gfyoung/scipy,pbrod/scipy,gertingold/scipy,argriffing/scipy,andyfaff/scipy,haudren/scipy,apbard/scipy,jor-/scipy,andyfaff/scipy,ilayn/scipy,befelix/scipy,ilayn/scipy,mdhaber/scipy,pschella/scipy,ilayn/scipy,nonhermitian/scipy,zerothi/scipy,behzadnouri/scipy,pyramania/scipy,e-q/scipy,dominicelse/scipy,endolith/scipy,aarchiba/scipy,pizzathief/scipy,e-q/scipy,Stefan-Endres/scipy,Eric89GXL/scipy,gertingold/scipy,dominicelse/scipy,vigna/scipy,anntzer/scipy,sriki18/scipy,josephcslater/scipy,endolith/scipy,haudren/scipy,argriffing/scipy,rgommers/scipy,nmayorov/scipy,gfyoung/scipy,tylerjereddy/scipy,pizzathief/scipy,gertingold/scipy,matthewalbani/scipy,apbard/scipy,sriki18/scipy,jakevdp/scipy,kalvdans/scipy,haudren/scipy,arokem/scipy,kleskjr/scipy,anntzer/scipy,josephcslater/scipy,kleskjr/scipy