Allow dataset to be an optional argument for (Distributed)LengthGroupedSampler
Fix #13797.

The idea is that now `dataset` and `model_input_name` are solely used to figure out `lengths` in `__init__` and serve no other purpose.