Mechanical and electronic properties under high pressure on ternary AlGaN and InGaN compounds—a first-principles perspective