SPARK-2566. Update ShuffleWriteMetrics incrementally

I haven't tested this out on a cluster yet, but wanted to make sure the approach (passing ShuffleWriteMetrics down to DiskBlockObjectWriter) was ok
I would make a note in the javadoc here that writeMetrics will not necessarily be current until `commitAndClose()` is called