Singleton pattern for sorts in java backend

ready for review
take a look at what I did with LOGIK. currently this matches `isKResult(_45:Sort) ~> _45:KResult ==K _45`. Is that really what you want? If not, you can use lookahead assertions to forbid matching both variables with the same name.