[prolog] simplify sort_list logic
[prolog] Remind on how to run prolog code

It took a while to figure out. Thanks to Ben Nadel's blog's commenters:
http://www.bennadel.com/blog/2070-seven-languages-in-seven-weeks-prolog-day-1.htm

I then improved it a bit.