Fix for ArrayObject sorting

- 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.