fix replaying zero-length reads

The problem here is that AutoRestoreScratch assumes that:

  data.resize(num_bytes/*=0*/);
  iter = data.data()

results in a non-nullptr |iter|.  Since |scratch_used()| assumes the
nullptr-ness of iter determines whether we have used scratch memory,
we didn't properly restore the original buffer pointer for zero-length
reads, leading to replay failures.