MB-10805: handle boundary case for failover logs

Change-Id: I30de888cd88f128486f573052d7a1a372708d1b6
Reviewed-on: http://review.couchbase.org/35521
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Bin Cui <bin.cui@gmail.com>