Fix SEGFAULT in BMI when removing a port
Fix SEGFAULT in BMI when removing a port

There were 2 issues with the code:
 * The FD_CLR call had been moved after the memset of the bmi_port_t
   structure, which means that we were not clearing the file descriptor
   at all.
 * We should not close the file descriptor while the select call is
   on-going, it is undefined behavior. We introduce a socketpair so that
   the thread removing the port can notify the select thread and wait
   for an acknowledgement before closing the file descriptor.

p4lang/behavioral-model,p4lang/behavioral-model,p4lang/behavioral-model,p4lang/behavioral-model,p4lang/behavioral-model