From Bayesian Sparsity to Gated Recurrent Nets