Extend file interface: int ferror() and const char *ferrmsg().

Based on initial patch by Tobias Scheuer.
Use strerror_r or strerror_s for thread-safety.

MinGW is the odd one out as it provides neither.
Then al_ferrmsg() only returns the empty string.
Make al_fclose have a return value.
Check al_fclose return value in saving routines.
ex_file: Conform to change in al_ferror.
ex_file: Test al_fclose return value.
Make al_fopen_fd not leak a FILE handle in a failure path.