Add SimpleNoCopyRlpEncoder
PR description
Adds a simple RLP encoder which doesn't rely on copying Bytes to form its output. This will be used in a coming PR related to sync improvements (PoC branch is https://github.com/hyperledger/besu/pull/9416)
Have you written any benchmarks to show if the performance is significant? Theoretically it might be with the array copies but am interested by how much. I don't have strong feelings as RLP should be outside of the EVM. For context in the EVM we are trying to prevent the proliferation of multiple implementations of Bytes and would like to keep it just at ArrayWrappingBytes and MutableBytes, which are flattened byte array structures.
No, I haven't benchmarked it. I suspect the primary benefit will be memory usage, allowing us to increase parallelism during sync, which is what we've seen from similar changes to block bodies.
Part of the strategy here is utilising ConcatenatedBytes to ensure we don't duplicate the data from the backing array.