Added new trainable.dataset_*_iterator functions, and implemented train_dataset, validate_dataset, and grad_check_dataset calling this function