Electronic structures and doping of SnO2, CuAlO2, and CuInO2