Autotools

Added autotools and added `reallocarray(3)` from OpenBSD to ensure that realloc can safely be called without worrying about integer overflow issues.