added mutual exclusion with active measurements using bismark facilities

NOTE: acquires lock on CURL, NC, NSLOOKUP, but the possible collateral damage on expiration is now prevented by a shorter timeout: everything will be terminated way before the lock expires. still ugly.