virtio: Add vring::used_ring_can_gc() helper

It is useful to test if we can do gc on the used ring.

Signed-off-by: Asias He <asias@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
virtio-blk: Do not call queue->get_buf_gc() with wait_until

When I hacked use_indirect() to always use indirect buffer, I saw this
assertion when running:

   $scripts/run.py  -e "/tests/tst-bdev-write.so vblk1"

   VFS: mounting devfs at /dev
   51.671 Mb/s
   Assertion failed: _status.load() == status::running
   (/home/asias/src/cloudius-systems/osv/core/sched.cc: prepare_wait: 655) Aborted

It turned out that we are making a waiting thread waiting again. get_buf_gc()
calls free which might make the thread in waiting state again.

Suggested-by: Dor Laor <dor@cloudius-systems.com>
Signed-off-by: Asias He <asias@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
virtio-rng: Do not call queue->get_buf_gc() with wait_until

Signed-off-by: Asias He <asias@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>