rpc: further constrain the libevent workaround
rpc: further constrain the libevent workaround

The bug was introduced in 2.1.6-beta, versions before that don't need the
workaround.

Github-Pull: #11593
Rebased-From: 97932cd2689659addfbb58dc6148928b73af3bd0

wangxinxi/litecoin,GroestlCoin/bitcoin,romanornr/viacoin,Anfauglith/iop-hd,particl/particl-core,particl/particl-core,gjhiggins/vcoincore,digibyte/digibyte,BitzenyCoreDevelopers/bitzeny,BitzenyCoreDevelopers/bitzeny,wangxinxi/litecoin,particl/particl-core,UFOCoins/ufo,gjhiggins/vcoincore,UFOCoins/ufo,romanornr/viacoin,BitzenyCoreDevelopers/bitzeny,Jcing95/iop-hd,GroestlCoin/bitcoin,particl/particl-core,Jcing95/iop-hd,gjhiggins/vcoincore,UFOCoins/ufo,Jcing95/iop-hd,digibyte/digibyte,tecnovert/particl-core,gjhiggins/vcoincore,digibyte/digibyte,gjhiggins/vcoincore,qtumproject/qtum,romanornr/viacoin,Anfauglith/iop-hd,Anfauglith/iop-hd,romanornr/viacoin,GroestlCoin/bitcoin,wangxinxi/litecoin,BitzenyCoreDevelopers/bitzeny,GroestlCoin/GroestlCoin,qtumproject/qtum,UFOCoins/ufo,GroestlCoin/bitcoin,digibyte/digibyte,tecnovert/particl-core,Anfauglith/iop-hd,Anfauglith/iop-hd,Anfauglith/iop-hd,UFOCoins/ufo,tecnovert/particl-core,Jcing95/iop-hd,wangxinxi/litecoin,GroestlCoin/GroestlCoin,wangxinxi/litecoin,romanornr/viacoin,qtumproject/qtum,qtumproject/qtum,UFOCoins/ufo,tecnovert/particl-core,GroestlCoin/bitcoin,particl/particl-core,gjhiggins/vcoincore,romanornr/viacoin,GroestlCoin/bitcoin,qtumproject/qtum,BitzenyCoreDevelopers/bitzeny,Jcing95/iop-hd,qtumproject/qtum,digibyte/digibyte,tecnovert/particl-core,digibyte/digibyte,GroestlCoin/GroestlCoin,tecnovert/particl-core,BitzenyCoreDevelopers/bitzeny,Jcing95/iop-hd,GroestlCoin/GroestlCoin,qtumproject/qtum,wangxinxi/litecoin,GroestlCoin/GroestlCoin,GroestlCoin/GroestlCoin,particl/particl-core