Homogenization of Dirichlet problems with nonnegative bounded constraints on the gradient