Ensure that the correct parent is chosen in relation chains
Fixup for da2b640d7e6c2157bb7af0bac7b37f66ca4a25fa
When examining heridity for a change in a relation chain, the "parent"
field of the newly merged change cannot be trusted due to gerrit
breaking relation chains on merge. Instead, use the previously fetched
relation chain data for the current-1 patchset to select a parent
change ID, then query for the current revision of the parent.
Also contains a fix for picking when the preferred parent is not ready.
Fixes: QTQAINFRA-5796
Fixes: QTQAINFRA-5849
Change-Id: I2a0dc214ae3669e83ff525d21ae46505d2acad51
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>