(PUP-2794) Change function each to dispatch based on block arity
This changes the implementation of the each function to use different
dispatchers depending on the arity of the given block. This means that
the included module for asserted_serving_size is no longer needed.