unix: portable preadv/pwritev use

preadv and pwritev are called directly on BSD, or by system call if
available on Linux. On systems that do not define them, preadv and
pwritev are emulated.