Add a new attribute to fds, `typecode`

This is the socket type code, masked off of the mode stat bits
Raise TypeError when invoking `fd.socket` for non-sockets