Single ZnO nanowire/p-type GaN heterojunctions for photovoltaic devices and UV light-emitting diodes