Two-dimensional electron gas and persistent photoconductivity in AlxGa1-xN/GaN heterostructures