On Bayesian mechanics: a physics of and by beliefs