Electrical and structural properties of AlGaN: A comparison with CVD diamond