Adaptive whitening with fast gain modulation and slow synaptic plasticity