Added Prolog sorting primitives

Finally.

sort/2, msort/2, keysort/2.