Abstract sort element/key types, comparions, key get

Fix sort test for signed integers (char, short, int, long)
Problems remain with fp types