Self-trapping and diffusion of hydrogen in Nb and Ta from first principles