[FIX] buffer: kernel crash caused by splice_read
- splice_grow_spd must be done _before_ spd structure filling;
- number of pages and partial must be PIPE_DEF_BUFFERS;
- pages that will be passed to splice_to_pipe must be copied, not
moved: it is unknown when they will be returned by tcp stack, so we
must not rely on their reuse;
- small refactoring.
Known issue:
- If a subbuffer is greater than max pipe size, we should splice this
subbuffer partially. So we should not put it to "write list". In
general a new mechanism for this should be implemented.
Tested with:
- 2 x 8Kb buffer;
- 16 x 64Kb buffer.