An exact reformulation of the Bose–Hubbard model in terms of a stochastic Gutzwiller ansatz