Try out socketpair to get an anonymously connected socket for invalidate_fd

This is an attempt at #516.