Electronic theory for surface segregation: Noble-metal alloys