Include shard uuids in db_info update sequences

This means `update_seq` values from `GET $db` `last_seq` returned from ` GET
$db/_changes?since=now&limit=` will be more resilient to change feed rewinds.
Besides, those sequences will now be more consistent and users won't have to
wonder why one opaque sequence works slightly differently than another opaque
update sequence.

Previously, when the sequences were returned only as numeric values, it was
impossible to calculate replacements and change feeds had to always rewind back
to 0 for those ranges. With uuids and epochs in play, it is possible to figure
out that some shards might have moved to new nodes or find internal replication
checkpoints to avoid streaming changes feeds from 0 on those ranges.

Some replication Elixir tests decode update sequences, so those were updated to
handle the new uuid and epoch format as well.

Fixes: https://github.com/apache/couchdb/issues/3787

Co-author: Adam Kocoloski kocolosk@apache.org
4 files changed