- This is a fix for issue
https://github.com/GarageGames/Torque3D/issues/228
- This fixes sortna() and sortnd() as outlined in the issue.
- This also fixes sortnka() and sortnkd(), as well as the sorting method
that take a console function as a parameter.
- Prevent stack corruption in a few places
- Use correct type in printfs
- Reduce type conversions in EngineApi & dAto*
- Fix compilation on GCC
- Tidy up code