Fix gevent.socket.socket.type API impl for PY3