Fix agent repr

Close channel before remove from outstanding
Do not update when the desired state is received more than once

@peterbourgon
If `id` is not in `o.m`, this will panic with `runtime error: close of nil channel`.

```go
if c, ok := o.m[id]; ok {
    close(c)
}
delete(o.m, id)
```