common:safe_io: create exact and non-exact variant
Create safe_read_exact, which fails with -EDOM unless it reads exactly
the requested number of bytes. More often, what we want is the
semantics of safe_read, which returns the number of bytes it read, or
negative on error. Likewise for pread.
Write doesn't need variants because failing to write all the bytes is
always an error.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>