Inhomogeneous Gutzwiller approximation with random phase fluctuations for the Hubbard model