Universal model for the surface energy of solids