PROTON-1771: [c] add missing lock around wake_if_inactive
PROTON-1771: [c] add missing lock around wake_if_inactive

Fixes a race condition discovered by threaderciser.c

astitcher/qpid-proton,kgiusti/qpid-proton,alanconway/qpid-proton,apache/qpid-proton,ChugR/qpid-proton,ChugR/qpid-proton,alanconway/qpid-proton,apache/qpid-proton,ChugR/qpid-proton,alanconway/qpid-proton,ssorj/qpid-proton,gemmellr/qpid-proton,astitcher/qpid-proton,apache/qpid-proton,alanconway/qpid-proton,apache/qpid-proton,gemmellr/qpid-proton,ChugR/qpid-proton,ChugR/qpid-proton,apache/qpid-proton,astitcher/qpid-proton,gemmellr/qpid-proton,alanconway/qpid-proton,ssorj/qpid-proton,kgiusti/qpid-proton,astitcher/qpid-proton,ssorj/qpid-proton,ssorj/qpid-proton,ssorj/qpid-proton,astitcher/qpid-proton,ssorj/qpid-proton,apache/qpid-proton,kgiusti/qpid-proton,astitcher/qpid-proton,alanconway/qpid-proton,ChugR/qpid-proton,gemmellr/qpid-proton,gemmellr/qpid-proton,kgiusti/qpid-proton,kgiusti/qpid-proton,kgiusti/qpid-proton,gemmellr/qpid-proton