Semiconductor-to-metal transition in HfSe2 under high pressure