[cs] move intmap key iterator into a class instead of dynamic object with closures (~2.3x faster)