[SP] Update the drawsurf sort code from MP.
Switched MAX_ENTITIES to MAX_REFENTITIES and similar defines.
MAX_SHADERS must remain 13 bits because of the weird sorting stuff with RF_ALPHA_FADE.
[SP] Disable FixRenderCommandList for now.
levelshot command was outputting bad images

copypasted MP stuff over
[SP] Fix out of bounds array access in R_FogFactor

R_FogFactor was accessing out of array bounds due to the s texture
coordinate being NaN. This follows from using a zero-length axis to
calculate the vertex positions for a cylinder fx, which was then used in
a foggy scene.

This commit corrects problems in all of the EFX update functions, which
continued to render the EFX, even when its orientation (represented by
a 3 axes) could not be determined.