Motivation:
The `wroteFrame` flag in `HTTP2ChannelHandler` indicates whether a frame
has been written. This flag is checked before flushing in order to avoid
unnecessary flushes. Unfortunately this is only ever set to `true`.
Modifications:
- Add a `flushIfNecessary` to check and toggle `wroteFrame` and flush if
necessary
- Add a test
Result:
- Few unnecessary flushes
- Resolves https://github.com/apple/swift-nio-http2/issues/245