Gamow-Teller strength in deformed nuclei within the self-consistent charge-exchange quasiparticle random-phase approximation with the Gogny force