Residual donors in wurtzite GaN homoepitaxial layers and heterostructures