add a retry capability to socket connection code used in bluesim path.  this added resiliance was needed for automated testing since putting sleep commands into the Makefile is embarrasing