algos.revisions_walker: Handle truncated/shallow histories
It might exist cases where a revision's parent is referenced but doesn't exist
in the archive resulting in a truncated/shallow history when walking on the
revisions graph.
That commit ensures the revision walkers will not end up in errors when
encountering such cases.
Closes T1675