Adding a non-protobuf allocate_ids method on Dataset.

Partially address #336.