t-reftable-readwrite: use 'for' in place of infinite 'while' loops
Using a for loop with an empty conditional statement is more concise
and easier to read than an infinite 'while' loop in instances
where we need a loop variable. Hence, replace such instances of a
'while' loop with the equivalent 'for' loop.
Mentored-by: Patrick Steinhardt <redacted> Mentored-by: Christian Couder <redacted> Signed-off-by: Chandra Pratap <redacted> Signed-off-by: Junio C Hamano <redacted>