Fix an issue with ktrdump(8) where it would not print all entries in the
KTR buffer.

This happens when 'i' tries to wrap around from 0 to 'entries - 1'. Since 'i'
is a signed integer the modulo operation actually returns a negative number.

Fix this by computing the next index to use "by hand" instead of relying
on the modulo operator.