move 'wait_port' method to Net::EmptyPort.