support registering a dataset object; support customizing collate_fn
support registering a dataset object; support customizing collate_fn

Reviewed By: zhanghang1989

Differential Revision: D31201334

fbshipit-source-id: 38928aa0eec0749af1edd10f40383257b29bec3c

facebookresearch/detectron2,facebookresearch/detectron2,facebookresearch/detectron2