Homogenization of linear and nonlinear transport equations