Add more max-checking to physics queries
Add more max-checking to physics queries

Fixes some out-of-bounds problems when there are more collisions than
have been requested for. This extends what has been done in 444b8471a3.

Fixes godotengine/godot#23990

guilhermefelipecgs/godot,josempans/godot,ex/godot,firefly2442/godot,godotengine/godot,pkowal1982/godot,Zylann/godot,Zylann/godot,ex/godot,godotengine/godot,honix/godot,akien-mga/godot,Zylann/godot,firefly2442/godot,okamstudio/godot,akien-mga/godot,Paulloz/godot,BastiaanOlij/godot,vnen/godot,okamstudio/godot,BastiaanOlij/godot,ZuBsPaCe/godot,firefly2442/godot,MarianoGnu/godot,Zylann/godot,Shockblast/godot,Valentactive/godot,vkbsb/godot,Shockblast/godot,guilhermefelipecgs/godot,vkbsb/godot,pkowal1982/godot,honix/godot,MarianoGnu/godot,Paulloz/godot,firefly2442/godot,josempans/godot,vkbsb/godot,MarianoGnu/godot,groud/godot,BastiaanOlij/godot,godotengine/godot,okamstudio/godot,guilhermefelipecgs/godot,godotengine/godot,ex/godot,Faless/godot,sanikoyes/godot,sanikoyes/godot,honix/godot,groud/godot,akien-mga/godot,guilhermefelipecgs/godot,guilhermefelipecgs/godot,godotengine/godot,sanikoyes/godot,okamstudio/godot,vnen/godot,Faless/godot,okamstudio/godot,pkowal1982/godot,Shockblast/godot,akien-mga/godot,pkowal1982/godot,Paulloz/godot,josempans/godot,vkbsb/godot,BastiaanOlij/godot,ZuBsPaCe/godot,firefly2442/godot,ZuBsPaCe/godot,ex/godot,ZuBsPaCe/godot,Faless/godot,ex/godot,akien-mga/godot,Faless/godot,akien-mga/godot,sanikoyes/godot,Paulloz/godot,josempans/godot,Faless/godot,Zylann/godot,Zylann/godot,guilhermefelipecgs/godot,BastiaanOlij/godot,Faless/godot,pkowal1982/godot,honix/godot,ZuBsPaCe/godot,DmitriySalnikov/godot,okamstudio/godot,groud/godot,vnen/godot,firefly2442/godot,Valentactive/godot,okamstudio/godot,Faless/godot,Paulloz/godot,pkowal1982/godot,sanikoyes/godot,Shockblast/godot,Paulloz/godot,MarianoGnu/godot,DmitriySalnikov/godot,okamstudio/godot,vnen/godot,josempans/godot,Valentactive/godot,vnen/godot,akien-mga/godot,vkbsb/godot,BastiaanOlij/godot,Valentactive/godot,pkowal1982/godot,groud/godot,MarianoGnu/godot,groud/godot,josempans/godot,BastiaanOlij/godot,honix/godot,godotengine/godot,ZuBsPaCe/godot,sanikoyes/godot,DmitriySalnikov/godot,Valentactive/godot,DmitriySalnikov/godot,ex/godot,Valentactive/godot,Paulloz/godot,sanikoyes/godot,firefly2442/godot,DmitriySalnikov/godot,ex/godot,josempans/godot,Valentactive/godot,vkbsb/godot,Zylann/godot,guilhermefelipecgs/godot,Shockblast/godot,vnen/godot,okamstudio/godot,DmitriySalnikov/godot,akien-mga/godot,Faless/godot,Shockblast/godot,Zylann/godot,ZuBsPaCe/godot,Shockblast/godot,vnen/godot,pkowal1982/godot,Shockblast/godot,ZuBsPaCe/godot,sanikoyes/godot,okamstudio/godot,firefly2442/godot,guilhermefelipecgs/godot,groud/godot,MarianoGnu/godot,ex/godot,godotengine/godot,BastiaanOlij/godot,honix/godot,vkbsb/godot,vnen/godot,DmitriySalnikov/godot,Valentactive/godot,MarianoGnu/godot,MarianoGnu/godot,vkbsb/godot,josempans/godot,godotengine/godot