Fixed bugs related to the handling of unprocessed items returned from batch operations.

Found a couple scenarios that would cause a NullPointerException when performing batch operations, as well as one spot where I was failing to increment the number of items processed by a batch write operation.