Effect of dislocations on electron mobility in AlGaN/GaN and AlGaN/AlN/GaN heterostructures