Something like this will give you the second code snippet you included
<li>
<?php
if (have_rows('klantslider')) {
$count = 0;
while (have_rows('klantslider')) {
if ($count > 0 && ($count % 3 == 0)) {
// after first itteration
// close li and open a new one every 3 rows
?>
</li>
<li>
<?php
}
the_row();
?>
<div class="slideitem"></div>
<?php
$count++;
}
} else {
}
?>
</li>