Average energy flow of optical pulses in dispersive media