The state’s top court has sided with the Maryland Department of the Environment in a dispute over airborne pollution from chicken farms, a ruling that frustrated environmental activists who say local waterways and communities are not being adequately protected. In a 6-1 decision, the Maryland Supreme Court found that the department’s permitting scheme for animal feeding operations (AFOs) does enough to regulate ammonia, an irritating gas that is emitted from animal waste and causes nutrient pollution.