glob: Add blocks support
This change introduces the glob_b function which takes a block instead
of a function pointer.
Relnotes: yes
Sponsored by: Klara, Inc.
Inspired by: https://github.com/apple-oss-distributions/Libc
Differential Revision: https://reviews.freebsd.org/D50485