Add hook point to override how to check flush-or-not-yet

3rd party buffer plugins needs hook point how to check whether chunk should be flushed or not.
Chunks are flushed for many reasons, like
  * how many data stored in it
  * how many data stored in one second
  * ... and many other types of buffers may exists