Add grouped sampling for data.table.
Closes #202