add generalized batch/flush module

  - call buffer_receive to add a new item to the outgoing queue
  - including class must implement flush(), which will be called with all
    accumulated items either when the output buffer fills (:max_items) or when a
    fixed amount of time (:max_interval) passes
  - call buffer_full? to determine if the module has hit :max_items. Module will
    block if buffer_receive is called while buffer_full? == true.
  - including class may implement on_flush_error(), which is called if flush()
    fails. (retries are automatic)
  - including class may implement on_full_buffer_receive(), which is called if
    batch_receive is called while the buffer is full.

tests are not complete yet. still in progress.