Implemented of Dataset.apply method

Fixes #140
Merge pull request #189 from shoyer/Dataset.apply

Implementation of Dataset.apply method