Handle multiple history_adds in one txn if possible.

This improves throughput with multiple clients.