Work around read() not finishing under paste

When run from mod_wsgi, env["wsgi.input"].read's default behavior of
reading until the end of the data is reached pulls in the rest of the
client's request.  Under paste with SSL, it blocks.  So if the client
sent a Content-Length header, stop after reading just that many bytes.
Prefer to read configuration from $KDCPROXY_CONFIG

If $KDCPROXY_CONFIG is defined, try to read it instead of
/etc/kdcproxy.conf.  Otherwise, read /etc/kdcproxy.conf, as
we did before.  Proposed for issue #4.
Handle python3's socket.SOCK_NONBLOCK more cleanly

Use the fact that python2 doesn't mix socket.SOCK_NONBLOCK in with
socket .type attributes to add a helper method that does the right
thing for both, and use it when reading back a socket's type.