BATCH-1957: Add StaxEventItemWriter deleteIfEmpty property

Added shouldDeleteIfEmpty property to StaxEventItemWriter. I also encountered and fixed a bug: the currentRecordCount property was not being initialized from the ExecutionContext on restart.