Fixed a couple of issues in BatchTransaction (test util)

so that it can use a configurable intermediary commit size and a progress
listener.