Phase stability and alloy-related trends in Ti–Al–N, Zr–Al–N and Hf–Al–N systems from first principles