Change sort representation to class

- changed sort representation from String to class
- modified API's accordingly
- replaced string literals with constants
- cleaned up a lot of mess 
he's converting between the two Sort classes for kompile versus the java backend. That's why I proposed Sort#toFrontend and Sort#toBackend methods.