impl Record minheap, Shard.read_version #17
impl Record minheap, Shard.read_version #17

`Shard.read_version` is used by Shard consumers to signal back to
the shard that a record has actually been read, and not just buffered.
This is done through `Shard.mark_read(sequence_number, read_version)`.

The read_version is incremented whenever the Shard's iterator changes
location; after which it will discard read acks for old read versions
(since the iterator is no longer where it was when the record being marked
was returned).

RecordHeap is a very simple wrapper around the fantastic stdlib's
heapq functions, and sorts buffered records by lowest
"ApproximateCreationDateTime".  The generating shard and read version for
that record are also stored with the record, so that the shard can be
notified when the record is finally consumed.

Some of the simple case for Coordinator.__next__ has been written; namely,
when there are records in the buffer.  Assumptions are made that the shard
which returned the record will also return a next shard (or None) and does
not handle expiration or exhaustion.

numberoverzero/bloop,numberoverzero/bloop