fixed CGI detection under mod_cgid
The Apache module mod_cgid is default in modern Apaches with
multi-threaded MPM and opens STDIN as a Socket, so interpreting that fact
to mean that we're under FastCGI works ONLY if $ENV{GATEWAY_INTERFACE} is
not set.
See: http://httpd.apache.org/docs/2.0/mod/mod_cgid.html
Exception: Some nginx FastCGI configuration examples (probably as a result
of copy/paste) instruct the user to set:
$ENV{GATEWAY_INTERFACE} = "CGI 1.1"
If anyone actually did that, FastCGI would be wrongly recognized as CGI in
their case.
See: http://wiki.nginx.org/FcgiExample