Energetics of H and NH_2 on GaN(1010) and implications for the origin of nanopipe defects