SyncProcessor should batch

Right now the sync processor syncs each transaction. It should batch transactions for better performance. Also, we need a unit test so that we can experiment how the batch size affects throughput and latency.