Correlation of polarity and crystal structure with optoelectronic and transport properties of GaN/AlN/GaN nanowire sensors.