agent: use mutexes to protect from data races in unit state tests
agent: use mutexes to protect from data races in unit state tests

esatterwhite/fleet,mookjp/fleet,jonboulle/fleet,octoblu/fleet,improbable-io/fleet,flandr/fleet,jonboulle/fleet,endocode/fleet,giantswarm/fleet,improbable-io/fleet,dongsupark/fleet,thepwagner/fleet,coreos/fleet,dalbani/fleet,bviswana101/fleet,dalbani/fleet,improbable-io/fleet,flandr/fleet,WPMedia/fleet,paveltiunov/fleet,endocode/fleet,giantswarm/fleet,wuqixuan/fleet,dongsupark/fleet,wuqixuan/fleet,thepwagner/fleet,mwhooker/fleet,webwlsong/fleet,webwlsong/fleet,endocode/fleet,dalbani/fleet,coreos/fleet,jonboulle/fleet,esatterwhite/fleet,dongsupark/fleet,giantswarm/fleet,coreos/fleet,mwhooker/fleet,octoblu/fleet,bviswana101/fleet,WPMedia/fleet,paveltiunov/fleet,mookjp/fleet