* configure.in: check qsort_r(3) and whether it is GNU version.
  BSD version has different prototype.

* util.h: use qsort_r() as ruby_qsort() if it is GNU version.

* util.c: define ruby_qsort() if needed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e