Effect of Mg Doping on the Electrical Performance of a Sol-Gel-Processed SnO2 Thin-Film Transistor