Hysteresis and avalanches in the random anisotropy Ising model