overhaul of way thread locking is done.
overhaul of way thread locking is done.

ensure only one socket task is outstanding at a time.

allow remote port to be 0, will use OMAPI_PROTOCOL_PORT.

cleaned up error handling so that everything is freed when
something fails.

pecharmin/bind9,each/bind9-collab,pecharmin/bind9,pecharmin/bind9,each/bind9-collab,pecharmin/bind9,each/bind9-collab,each/bind9-collab,each/bind9-collab,pecharmin/bind9,each/bind9-collab,pecharmin/bind9