Correlations between magnetism, microstructure, crystallography, and phase stability in GdNi1−xCox alloys