reverseproxy: preallocate upstream slices with known sizes (#7926)