compat: convert modes to use portable file type values

This adds simple wrapper functions around calls to stat(), fstat(),
and lstat() that translate the operating system's native file type
bits to those used by most operating systems.  It also rewrites the
S_IF* macros to the common values, so all file type processing is
performed using the translated modes.  This makes projects portable
across operating systems that use different file type definitions.

Only the file type bits may be affected by these compatibility
functions; the file permission bits are assumed to be 07777 and are
passed through unchanged.

Signed-off-by: David Michael <fedora.dm0@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Preserve z/OS encoding tags during file operations

Since basically everything uses a character set that's incompatible
with EBCDIC (IBM-1047), we have to rely on the automatic conversion
of tracked files for any reasonable chance of maintaining them.  In
z/OS UNIX, files can be tagged with the encoding of their contents
so tools are able to work with various encodings transparently.
This change ensures the tags are not lost when Git recreates files.
Add template files to help z/OS usage

First, this adds a default empty .git/config file for every project
so that its encoding can be tagged on install.

Also, two example hooks are added.  These are just to show how to
keep the tracked files properly tagged so they are usable between
EBCDIC and ASCII programs.  One hook is faster and safer by simply
tagging everything as ASCII, and the other converts all files to
IBM-1047 on disk for programs that don't support auto-conversion.
Include default build settings for the z/OS port
Add build notes for the z/OS port