Alloy surfaces: segregation, reconstruction and phase transitions