Build option to use bundled replacement for qsort_r

CentOS 5.x lacks the "qsort_r" function in the C library.

Add a new build option, USE_OWN_INSERTSORT_R, to force
libgit2 to use its own bundled replacement.

To use:

  cmake -DUSE_OWN_INSERTSORT_R=on .

then do the cmake build and install steps normally.