libc: add test case for qsort_b(3)
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D36463
(cherry picked from commit c65e42dbde4198ce46aef7ddac061390abe672dc)
(cherry picked from commit 4385a9f851bbbb88a4310ebfa929dfab01b6fc4d)