Partially factorized variational inference for high-dimensional mixed models