[variational] Add prior_posterior(), non-copy warnings, better memory allocation