Autotools

Added autotools and added `reallocarray(3)` from OpenBSD to ensure that realloc can safely be called without worrying about integer overflow issues.
The indentation here seems to have been broken.