Ensure valid seq is returned in changes feed

When nodes go down whilst continuous replications are running sequences with
incomplete ranges are returned, which creates havoc if they get into chekpoints.
This patch makes a final call to is_progress_possible and errors out if an invalid
sequence would be returned.

BugzID: 17240
BugzID: 16415
Remove dups and fix holes in unpacked since sequences

It's important that sequences include all the shard ranges. This patch checks
that and also removes any duplicates, choosing the shard with the maximum
sequence number.

BugzID: 13533
BugzID: 17240
BugzID: 16415
Document defensive code
Merge pull request #73 from cloudant/17240-16415-replication-checkpoints

Prevent permanent holes in replication checkpoints

BugzID: 16415
BugzID: 17240