backport MockSnmpAgent atomic fixes from master
Merge remote-tracking branch 'origin/1.12'