Stablize TimSort

* Changed [r]gallop_last to return last element in array v <= x
  to be consistent with searchsortedlast
* Fixed merge comparisons to be stable
Merge pull request #2151 from kmsquire/timsort_fixes

Stablize TimSort (fixes #2138)