Use arpa/inet.h functions instead of endian.h

Even though arpa/inet.h is "networky" and this isn't a network
application, arpa/inet.h is in POSIX whereas endian.h is non-standard.

This should let git-crypt build on Mac OS X.
Compile with 'c++' instead of 'g++'

We're not relying on any g++-specific features.
Restore original umask after running keygen