Add comments:
* raise NotImplementedError explicitly for methods to be implemented in child classes
* what these method does
* what instance variables are
value of @map[key] is not Array, but a object: "top" is wrong name
variable name just "empty" is misleading with "chunk.empty" just above
add missing tests...
Comment and variable name
 * value of @map[key] is not array, but just a chunk
 * comments for return value and others
add tests for BasicBuffer#emit
add tests of MemoryBuffer
Add spaces, comments and replace attr_reader for understandable position
add comment for mistery
add test for buf_file
fix to replace obsolete URI.escape(escape) with URI::Parser#escape(unescape)
refactor to remove dup code
Add comments and test cases:
 * dots are used as separator in buffer paths
 * for keys, dots are also used
 * in resume sequence, file buffer plugin cannot determine whether:
   * "any.chars" is key
   * "__prefix__.any" is the prefix of other buffer plugin instance
   * for the path such like "__prefix__.any.chars.b000000.__suffix__"
 * Hopefully, we should escape dots (".") in keys...
   * But it breaks compatibilities
Support guaranteed delivery from ForwardOutput to ForwardInput

Protocols between ForwardOutput and ForwardInput are extended, adding `option` object
to the end of the array, which is used to identify which chunks are written into the buffer.
Additional behaviors of ForwardOutput and ForwardInput are as follows:

ForwardOutput sends data including `option` object which has object id of the chunk
with a value of `seq` key. After sending data, ForwardOutput waits for a response
from InputForward in a certain time.
* If there is a response:
  * and if `ack` value of the response is same as `seq` value of sent data, it succeeded.
  * but if `ack` value and `seq` value are different, ForwardOutput sends the chunk again.
* If there is no response, ForwardOutput regards the target node as unavailable
  but does not send the chunk again because of compatibility.

InputForward checks if received data includes `option` object. If it does, InputForward
responds to OutputForward after the chunk is written into the buffer (Engine.emit).
The response has the `seq` value of the received data as a value of `ack` key, and is
serialized in the same way as received data.
Fix an undefined variable name

n    ->
node
Avoid deserializing an empty string which leads to EOFError

When connection is closed by remote host, Socket#recv returns an empty
string. So deserialize received data only when it is not empty.
Add test cases with DummyEngineDriver

In test cases, DummyEngineDriver creates a TCP server in another thread and runs ForwardInput on it.
To prevent ForwardInput from accessing Fluent::Engine by calling Engine.emit_streams,
DummyEngineDriver creates a dummy engine and sets Fluent::ForwardInput::Engine to it.
Add config parameters for requiring in_forward to respond with ack

There are three parameters for ack (two are newly added, one is renamed):

* extend_internal_protocol
  Whether to add an optional hash to the end of the sent data from
  out_forward to in_forward. This is used for requiring ack responses or
  some future functions.

* require_ack_response
  Whether to require in_forward to respond with ack. If true, the
  optional hash contains a chunk id.

* ack_response_timeout
  How many seconds out_forward waits for an ack response in.

To enable ack responses, set both extend_internal_protocol and
require_ack_response to true, and set ack_response_timeout to greater
than zero.
Rename test methods which do not correspond with the situations
Set when OutputTestDrier#run ends

`d.expected_emits_length` is set only to wait for Driver to finish
running on timeout. The length of emits is not suitable for a post
condition because ForwardOutput does not actually call
Engine.emit_streams and @emit_streams is always empty.