Surface segregation in multicomponent systems: Modeling of surface alloys and alloy surfaces