datastore: Add support for end cursors

Fixes #83.