Makefile: add -D_BSD_SOURCE -D_GNU_SOURCE [Ubuntu]

Tell glibc that we want to have access to additional features. This (and
some upcoming changes) are required to make randomize build on Ubuntu
14.04.
Makefile: link randomize in the proper order

This breaks on Ubuntu 14.04; it happens to work on OpenBSD, but it's
still wrong.
Makefile: add env LC_ALL=C before "sort"

Many of the testcases rely on sort(1), but GNU sort(1) sorts in a
locale-specific fashion - and Ubuntu does not default to the traditional
C locale.

This is ugly, IMHO, but let's make it work.
compat.c: use unsigned for u_int

Just use the standard type instead of a system-specific typedef. Fixes
build on Ubuntu 14.04.
compat.h: bring back definition for VIS_ALL

VIS_ALL was used in compat.c, but never defined. This error broke the
build on all systems that do not have vis(3).
compat: add strlcat(), strtonum() replacements

These functions are not supported by GNU libc.
randomize.c: workaround GNU getopt

GNU getopt behaves different from traditional getopt, and recognizes
command-line arguments anywhere on the line. That's not a good thing if
you want positional arguments to take effect starting from their
position on the command-line... so tell GNU getopt to behave.
rec_close(): fix realloc-as-free confusion

On OpenBSD, realloc'ing an allocation to zero bytes returns a special
invalid pointer, not NULL. GNU libc just returns NULL here, which is
perfectly fine. Stop relying on OpenBSD's behavior.
.gitignore ctags, cscope