Nonlinear Lagrangian equations for turbulent motion and buoyancy in inhomogeneous flows