Metastable states and T=0 hysteresis in the random-field Ising model on random graphs