A unified second-order accurate in time MPM formulation for simulating viscoelastic liquids with phase change