Only call clear on prevector if it isn't trivially destructible
Only call clear on prevector if it isn't trivially destructible

and don't loop in clear

backports bitcoin@45a5aaf147ba65388333a8f40ae01b04a2d4a8c8
PIVX-Project/PIVX,Darknet-Crypto/Darknet,Darknet-Crypto/Darknet,PIVX-Project/PIVX,PIVX-Project/PIVX,Darknet-Crypto/Darknet,PIVX-Project/PIVX,Darknet-Crypto/Darknet,PIVX-Project/PIVX,Darknet-Crypto/Darknet,Darknet-Crypto/Darknet,PIVX-Project/PIVX,PIVX-Project/PIVX,PIVX-Project/PIVX,PIVX-Project/PIVX