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
minor - but if this is going to be called `writeSinceMetricsUpdate` then it might be cleaner to do something like this:

```
if (writesSinceMetricsUpdate % 32 == 0) {
  updateBytesWritten()
  writesSinceMetricsUpdate = 0
} else {
  writessinceMetricsUpdate += 1
}

```