Add Wall and Wextra to default CFLAGS
Don't fail on trailing sorted newline

A newline at the end-of-file will return a NULL the same as an error.
ferror is needed to disambiguate failure from empty line.
free doesn't require NULL checks
fix memory and file handle leaks
wrap system calls with better error detection

Calls to `system` may return with results indicating non-zero children
exit codes. Wrap calls to `system` with a hard failure case similar to
strdup.
Make global stat struct local to readfile

Moving the stat structure local to readfile removes a variable shadow
warning and simplifies ownership.
trim or move unneeded headers
retab domd5sum from mixed spaces/tabs to pure tab
move stat structure inside loop to avoid shadowing
avoid implicit unsigned/signed casting