restore old qsort() based code and add preprocessor directives to switch
-DLMP_USE_LIBC_QSORT will use qsort() from libc to sort (requires static/global variables).
-DLMP_USE_MERGE_SORT will use a plain merge sort. slightly slower for expensive comparisons.
-DLMP_USE_HYBRID_SORT will use hybrid merge sort. faster than merge sort (no static/global variables)