Fix a bug where fireInboundBufferUpdated() and flush() swallow the event too early

- Fixes #1292
- Replace DefaultChannelPipeline.inbound/outboundShutdown flag with per-context flags
- Update the flags in free() / freeInbound() / freeOutbound() for clarity