Add a method to help with filter/field iteration

- Add explanatory comments
This doxygen comment will be attached only to the id_field_end() function in the generated documentation. doxygen doesn't support comments for blocks of functions. Can you re-write this to describe only the meaning of the id_field_end() function, and how to use it to iterate over field indices?