tests/functional: add test for reading/writing partially zeroed data

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
util: fix calculation of offset and length in find_zero_blocks()

This fixes bugs introduced by the below commits:

 - cfd1a566: the length of a fraction at the beginning of buffer was
             wrong.

 - 6169a0da: this commit removes memmove() from find_zero_blocks(), so
             offset calculation should have been changed.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>