Master waits on slave setup completion

The master no longer sends subjobs immediately after triggering build
setup on the slave. The slave now executes build setup, then notifies
the master of whether setup was successful or not. If successful, then
the master starts sending subjobs to the slave.

If setup failed, currently the master will tell the slave to shut down
but we'll change this in a future commit to just reset the slave.

As part of this change, I also refactored how the slave sends "idle"
and "disconnect" notifications to the master. Previously "idle" and
"disconnect" were their own API endpoints. Now the slave does a PUT
on a slave state field. This, besides being more "restful", is more
extensible if we want to add more state notifications in the future.

This change fixes a bug where if build setup failed on the slave, the
slave would shut down completely. (This is actually still the behavior,
but now it is more explicit and we can easily change the behavior in a
future commit.)
On second thought I might just leave both of those internal calls to `_add_idle_slave()` as-is. I think if we ever change this method to also account for the slave's previous state (like we were talking about -- a finite state machine) we'd need to change those internal calls again anyway.

I also feel like in the slave allocation loop right now, it reads slightly better to call `add_idle_slave` vs `handle_slave_state_update`. (Since there would be no balancing `handle_slave_state_update` call that would remove the slave from the idle state.) 

Eh, this is pretty subtle -- I probably spent more time trying to word this response than I ever would have saved by just choosing a way and doing it. :bowtie: