libc: regex functions

I am interested in the fnmatch function for an application. To avoid future
problems, I am also importing the glob function. Those functions are regular
expression parsers, but they work with shell wildcards instead of the usual
posix re. Because of that, I am taking it from musl instead of implementing
them on top of boost's re engine. This is a 100 % verbatim copy of the relevant
musl files.

Aside from the verbatim copy, I am moving some of the definitions in fnmatch.h
outside GNU_SOURCE. Musl code does not expect them there.

v2: remove the other re functions from the patch. Leave only the wildcard ones.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>