implement RowsPerPage for external CustomFieldValues

This is only for limiting the result set and necessary to make
b22dbbb20d6121a30d502d379c9f34ce61b4fabc work.

$i was already defined but unused.
Merge branch '4.2/cfv-external-rowsperpage' into 4.2-trunk