DetachedServer.handle_waiting

DetachedServer.handle_waiting(conn, new_idle_count)

Record that an employee is idle with nothing to do.

There is a race condition here that is allowed. If an employee sends a waiting message at the same time that this sends it a task, it will still be marked waiting even though it is running a task. We allow this for two reasons. First, the consequences are minimal: this situation can only lead to one extra task assigned to the worker that could otherwise go to a truly idle worker. Second, it is unlikely in the common BQSKit workflows, which have wide and shallow task graphs and each leaf task can require seconds of runtime.