Split sort_by_key instantiation into multiple files

* Compilation being killed due to timeout on tegra. Required splitting
Changed dir to isAscending in all sort functions
Merge pull request #205 from shehzan10/sort_fixes

Sort fixes
- sort_by_key split across two files
- dir changed to isAscending.