MAINT: Interpolate: use stable sort (#12566)
MAINT: Interpolate: use stable sort (#12566)

Co-authored-by: Alex Izvorski <2f1d129994832d00dbffdebd3c1ff67dcee24b17@gmail.cm>

Use stable sort in interp1d, so that duplicate x values keep the order. See gh-12566 and gh-12373 for the report.
grlee77/scipy,Eric89GXL/scipy,Eric89GXL/scipy,matthew-brett/scipy,matthew-brett/scipy,WarrenWeckesser/scipy,nmayorov/scipy,tylerjereddy/scipy,e-q/scipy,andyfaff/scipy,rgommers/scipy,andyfaff/scipy,scipy/scipy,mdhaber/scipy,Eric89GXL/scipy,zerothi/scipy,rgommers/scipy,anntzer/scipy,matthew-brett/scipy,Stefan-Endres/scipy,perimosocordiae/scipy,nmayorov/scipy,Eric89GXL/scipy,tylerjereddy/scipy,anntzer/scipy,matthew-brett/scipy,andyfaff/scipy,ilayn/scipy,Eric89GXL/scipy,nmayorov/scipy,vigna/scipy,Stefan-Endres/scipy,scipy/scipy,WarrenWeckesser/scipy,zerothi/scipy,andyfaff/scipy,zerothi/scipy,Stefan-Endres/scipy,ilayn/scipy,grlee77/scipy,Stefan-Endres/scipy,tylerjereddy/scipy,WarrenWeckesser/scipy,rgommers/scipy,tylerjereddy/scipy,andyfaff/scipy,perimosocordiae/scipy,perimosocordiae/scipy,ilayn/scipy,scipy/scipy,mdhaber/scipy,mdhaber/scipy,WarrenWeckesser/scipy,rgommers/scipy,tylerjereddy/scipy,e-q/scipy,vigna/scipy,nmayorov/scipy,nmayorov/scipy,zerothi/scipy,scipy/scipy,mdhaber/scipy,anntzer/scipy,e-q/scipy,endolith/scipy,WarrenWeckesser/scipy,anntzer/scipy,mdhaber/scipy,perimosocordiae/scipy,e-q/scipy,Stefan-Endres/scipy,ilayn/scipy,scipy/scipy,zerothi/scipy,endolith/scipy,ilayn/scipy,endolith/scipy,Eric89GXL/scipy,vigna/scipy,ilayn/scipy,andyfaff/scipy,e-q/scipy,vigna/scipy,grlee77/scipy,endolith/scipy,WarrenWeckesser/scipy,scipy/scipy,endolith/scipy,anntzer/scipy,perimosocordiae/scipy,mdhaber/scipy,grlee77/scipy,perimosocordiae/scipy,anntzer/scipy,matthew-brett/scipy,grlee77/scipy,endolith/scipy,rgommers/scipy,vigna/scipy,zerothi/scipy,Stefan-Endres/scipy