A Metalearned Neural Circuit for Nonparametric Bayesian Inference