Phase equilibria in transition metal Al-Ga-N systems and thermal stability of contacts to AlGaN