Hebbian and Gradient-based Plasticity Enables Robust Memory and Rapid Learning in RNNs