buffer for reading is now obtained by calling read_buffer
factored buffer out of basic_protocol

protocol_core represents the core protocol but doesn’t use a buffer.
The buffer is provided by subclasses. This allows subclass a better
memory management.
factored core out into its own file