Added first_key and last_key to dataset

This PR depends on #1238.

Just added two more methods to `dataset` to be able to know which is the first_key and last_key. This would be very useful when the keys are generated sequentially.

@kmatzen Could you take a look?