agent: refactor sync loop to linear flow of control
agent: refactor sync loop to linear flow of control

youhong316/consul,hashicorp/consul,i0rek/consul,42wim/consul,vamage/consul,scalp42/consul,kingland/consul,vamage/consul,scalp42/consul,i0rek/consul,hashicorp/consul,kingland/consul,kingland/consul,42wim/consul,calgaryscientific/consul,kingland/consul,youhong316/consul,i0rek/consul,vamage/consul,calgaryscientific/consul,youhong316/consul,scalp42/consul,vamage/consul,i0rek/consul,scalp42/consul,i0rek/consul,youhong316/consul,youhong316/consul,calgaryscientific/consul,calgaryscientific/consul,hashicorp/consul,42wim/consul,calgaryscientific/consul,42wim/consul,hashicorp/consul,42wim/consul,kingland/consul,vamage/consul,scalp42/consul