core: ap_filter_output_pending() to flush outer most filters first.
Since previous output filters may use ap_filter_should_yield() to determine whether they should send more data (e.g. ap_request_core_filter), we need to flush pending data from the core output filter first, and so on up the chain.
Otherwise we may enter an infinite loop where ap_request_core_filter() does nothing on ap_filter_output_pending() called from MPM event.
They were superseded by ap_filter_should_yield() and ap_run_in/output_pending() in r1706669 and had poor semantics since then (we can't maintain pending semantics both by filter and for the whole connection).
Register ap_filter_input_pending() as the default input_pending hook (which seems to have been forgotten in the first place).
On the MPM event side, we don't need to flush pending output data when the connection has just been processed, ap_filter_should_yield() is lightweight and enough to determine whether we should really enter write completion state or go straight to reading. ap_run_output_pending() is used only when write completion is in place and needs to be completed before more processing.