osd: fix agent thread shutdown

We had an old invariant that agent_queue would have at least 1 entry in
it to simplify some other code paths, but it turns out that it is simpler
not to do that.

In particular, this was triggering a failed assertion on shutdown when we
assert that the queue is empty.

Dump offending items on shutdown if they are there, tho, to catch any
future bugs.

Fixes: #7637
Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #1395 from ceph/wip-7637

osd: fix agent thread shutdown

Reviewed-by: Samuel Just <sam.just@inktank.com>