collie: use xread and xwrite instead of read and write

The following code in vdi_read() is wrong

   write(STDOUT_FILENO, buf + (len - remain), len)

The number of bytes to be written should be 'remain'.

Rather than fixing it, this patch replaces them with xread() and
xwrite(), which don't return a short length on success.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
introduce eventfd_xread and eventfd_xwrite

Currently, we don't check the return value of eventfd_read and
eventfd_wriete in many places.  This introduces a helper function
which retries on EINTR and calls panic() on unrecoverable errors.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>