Improve worst-case behavior of CScript::FindAndDelete
Improve worst-case behavior of CScript::FindAndDelete

Thanks to Sergio Lerner for identifying this issue and suggesting this kind of solution.

cddjr/BitcoinUnlimited,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,Bitcoin-com/BUcash,krzysztofwos/BitcoinUnlimited,Bitcoin-com/BUcash,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,Bitcoin-com/BUcash,Justaphf/BitcoinUnlimited,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,marcusdiaz/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnlimited,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,BitcoinUnlimited/BitcoinUnlimited,marcusdiaz/BitcoinUnlimited,marcusdiaz/BitcoinUnlimited,Justaphf/BitcoinUnlimited,Bitcoin-com/BUcash,BitcoinUnlimited/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,krzysztofwos/BitcoinUnlimited,Justaphf/BitcoinUnlimited,cddjr/BitcoinUnlimited,krzysztofwos/BitcoinUnlimited,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,marcusdiaz/BitcoinUnlimited,BTCfork/hardfork_prototype_1_mvf-bu,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,marcusdiaz/BitcoinUnlimited,Bitcoin-com/BUcash,krzysztofwos/BitcoinUnlimited,cddjr/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,BTCfork/hardfork_prototype_1_mvf-bu,krzysztofwos/BitcoinUnlimited,BTCfork/hardfork_prototype_1_mvf-bu,cddjr/BitcoinUnlimited,cddjr/BitcoinUnlimited,cddjr/BitcoinUnlimited,BTCfork/hardfork_prototype_1_mvf-bu,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnlimited,krzysztofwos/BitcoinUnlimited,BTCfork/hardfork_prototype_1_mvf-bu,Bitcoin-com/BUcash,marcusdiaz/BitcoinUnlimited,BTCfork/hardfork_prototype_1_mvf-bu