Build: configure: require functions instead of replacing them
Because we define _GNU_SOURCE in portability.h, alphasort(), scandir(),
strnlen(), and strndup() should all be available in glibc on all versions
of Linux distributions we support. As they originated in BSD, they should be
available there as well.
Also remove some leftover declarations of formerly replaced functions in
portability.h.