A First Principles Study on the Electronic, Optical and Hole Effective Mass Properties of Mg-Doped CuAlO_2 and AgAlO_2