Alternating aerobic and anoxic digestion of waste activated sludge