Pressure-induced structural and spin transitions of Fe3S4