Add `batch` method to `Dataset`
### Feature request

Add a `batch` method to the Dataset class, similar to the one recently implemented for `IterableDataset` in PR #7054.

### Motivation

A batched iteration speeds up data loading significantly (see e.g. #6279)

### Your contribution

I plan to open a PR to implement this. 