Only discard gen_event notifications on high watermark

Previously all messages were being flushed, which meant that trapped exits
and internal gen_event messaging was also flushed, leading to undefined
behaviour.

closes #198
Merge pull request #201 from yfyf/flush_only_events

Only discard gen_event notifications on high watermark