Test: read long files (regression after 3.5)
Check compiler name for -Wno-duplicate-decl-specifier

Just passing -Wno-duplicate-decl-specifier does not cause GCC to abort.
Cosmetics
Merge FileRead/FileReadMax into single function

This change simplifies error reporting and avoids unreliable checking
of stat(2) to preallocate buffers. (Closes: Redmine #3658).
Merge pull request #1086 from dottedmag/test/read-long-files-broken

Fix reading long files using readfile() by consolidating existing file-reading functionality