Removing the need to allocate here and instead iterate over the tx directly improves performance slightly.
SeeIn D15552 for some benchmarks,, in the WS loop, applying this diff sped it up to 850.29s from 969.39s when resyncing the first 300000ish blocks. I haven't run a dedicated benchmark just for this diffThis loop is now removed when empty, but we can predict a similar improvements should be in a similar range of 150s-300s based on it for GroupHistoryWriter and GroupUtxoWriter.