Restructurings around PrimitiveLongIterator.

Replace generic constructs (map/filter) that were use in only one
place with concrete implementations of their behaviour. This is
actually a further optimisation as well, since it leads to less
indirection (only lookup a field, instead of a field of a field) and
fewer objects created. In terms of code amount and clarity it is also
less and clearer code, since the generic constructs were only used for
a single purpose each.

Extract a PropertyKeyIdIterator, since that behaviour was implemented
in five different anonymous classes.

+ some cleanup based on Intellij warnings.