Do one single transaction for each batch of changes in receiver_raw

This reduces the overhead caused by long transactions on the receiver.