Fix leaking FD

See #1289 
Can we run wg.Wait(), in.Close(), out.Close() in a separate goroutine, so that we won't be blocked serving next proxy?