Test for maxfev and maxiter limits for neldermead and powell optimization
Test for maxfev and maxiter limits for neldermead and powell optimization

Tests that optimization does not give up before trying requested
number of iterations or evaluations. And that it does not succeed
by exceeding the limits. Also check that returned function call
count is accurate.

See #5966

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