BUG-3219: Fix OutboundQueue cleanup on channel failure
When the channel goes inactive, we still need to make sure that any
entries that were reserved and not committed get flushed. Instead of
perfoming a one-shot cleanup in channelInactive(), perform cleanup
whenever flush() runs.
When channel goes inactive, we just cleanup the obviously-freeable
resources and ensure that a flush is scheduled.
Change-Id: I48e1ceb51dcfafedb7352db5d952e9749cdfa50d
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit
44b028491689d8d89c2ffea2e7bc6bb2d80209fe)