Avoid unnecessary lseek calls
Avoid unnecessary lseek calls

Previously we would call `lseek` before every `read` or `write` even
if the file pointer was already correctly positioned.

This patch caches the file pointer position and avoids unnecessary
calls to `lseek`, i.e. if the I/O is sequential.

Signed-off-by: David Scott <bfcdf3e6ca6cef45543bfbb57509c92aec9a39fb@recoil.org>

mirage/mirage-block-unix,djs55/mirage-block-unix,samoht/mirage-block-unix