Configurable analog hardware for neuromorphic Bayesian inference and least-squares solutions