Upstream lib/gitlab/buffered_io.rb changes to net-protocol

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

!78065 (merged) monkey patch changes in net-protocol.

This patch needs be adapted for the changes in v0.2.1 (https://github.com/ruby/net-protocol/compare/v0.1.2..v0.2.1).

!112400 (merged) locks the version of net-protocol, but since this now a default gem (https://stdgems.org/net-protocol/) we need to adapt the changes for Ruby 3.2.

/cc: @Andysoiron

Edited by 🤖 GitLab Bot 🤖