Fix infinite blocking caused by passing wrong nfds to select(). Mac porting ok. Fix txt record parsing according to dns-sd standard.