Solid-state wetting transitions at grain boundaries