Temperature- and pressure-induced spin-state transitions in LaCoO 3