classifier: Add functions and macros for iteration, and use them in ofproto.