Cosmological phase transitions and gravitational waves