Thermal and compositional evolution of the martian mantle: Effects of phase transitions and melting