Add automated pairing tests
Pairing bugs such as the one fixed in !342 (merged) currently go undetected until users complain. We should add a test directory with obsolete sessions of various shape numbers to check that the pairing succeeds without detached goals.