pv: move more unix I/O to device.ml

Signed-off-by: David Scott <dave.scott@eu.citrix.com>