Move posting shutdown forward in stop sequence
Move posting shutdown forward in stop sequence

By posting the state update before stopping running assignments, we
avoid having the master assign us new work in the narrow window
in-between, and then failing it when polling us the next time.

pyfarm/pyfarm-agent,pyfarm/pyfarm-agent,guidow/pyfarm-agent,pyfarm/pyfarm-agent,guidow/pyfarm-agent,guidow/pyfarm-agent