* fix, plugin hooks: improved checks to prevent the last buffer on a pipe
  to plugins (plugin_pipe_size) could go partly out of bounds.