Make possible to specify the buffer size for the pipes

* add a new parameter pipe_buffer_size with a default value to both client and server initialize methods. (keep compatibility with existing code)
* perf improvments:
  - avoid using a new buffer for each read/write operation
  - change default buffer size to 4096