Spectral likelihood expansions for Bayesian inference