[tests] Fixed intermittent failure in p2p_sendheaders.py.
[tests] Fixed intermittent failure in p2p_sendheaders.py.

Added handling for the case where headers are announced over more than one message.
refs #12453

Github-Pull: #13192
Rebased-From: 12d1b77f7eb2ca274890d9fb45d6c19a40ba8f74

GroestlCoin/bitcoin,myriadteam/myriadcoin,starwels/starwels,GroestlCoin/bitcoin,ppcoin/ppcoin,myriadteam/myriadcoin,myriadteam/myriadcoin,peercoin/peercoin,viacoin/viacoin,GroestlCoin/bitcoin,myriadcoin/myriadcoin,GroestlCoin/GroestlCoin,gjhiggins/vcoincore,ppcoin/ppcoin,GroestlCoin/GroestlCoin,ppcoin/ppcoin,GroestlCoin/GroestlCoin,viacoin/viacoin,viacoin/viacoin,GroestlCoin/GroestlCoin,1185/starwels,gjhiggins/vcoincore,myriadcoin/myriadcoin,gjhiggins/vcoincore,GroestlCoin/GroestlCoin,peercoin/peercoin,1185/starwels,myriadteam/myriadcoin,gjhiggins/vcoincore,gjhiggins/vcoincore,1185/starwels,1185/starwels,starwels/starwels,peercoin/peercoin,myriadteam/myriadcoin,viacoin/viacoin,DigitalPandacoin/pandacoin,starwels/starwels,myriadteam/myriadcoin,DigitalPandacoin/pandacoin,myriadcoin/myriadcoin,starwels/starwels,DigitalPandacoin/pandacoin,1185/starwels,viacoin/viacoin,gjhiggins/vcoincore,viacoin/viacoin,GroestlCoin/bitcoin,myriadcoin/myriadcoin,GroestlCoin/GroestlCoin,peercoin/peercoin,1185/starwels,peercoin/peercoin,starwels/starwels,peercoin/peercoin,DigitalPandacoin/pandacoin,starwels/starwels,GroestlCoin/bitcoin,DigitalPandacoin/pandacoin,GroestlCoin/bitcoin,myriadcoin/myriadcoin,DigitalPandacoin/pandacoin,ppcoin/ppcoin,myriadcoin/myriadcoin