[serial] Fixed memory leaks on device's surprise removal (bz#833671).
[virtio-lib] Fix vring_detach_unused_buf function (related to bz#759019).

When a buffer was detached from the ring buffer the index was not
decremented. This caused qemu to think that there are more available
buffers than the actual ring buffer size.