Test readv() and fread()

This test confirms bug issue #354, and verifies its fix.

It demonstrates that readv() wrongly modified its const parameter, and
fread() returned garbage data (compared to the correct data returned by
getc() and read()), and that after this bug's fix, both readv() and
fread() work correctly.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Fix writev() as well

This patch fixes a bug in writev() identical to the one we already fixed
in readv() - it illegally modified its const argument.

The patch also adds to tests/tst-uio.cc a test for this bug.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>