Pressure-induced insulator-to-metal transition in the van der Waals compound CoPS3