Autotrophic and heterotrophic denitrification for simultaneous removal of nitrogen, sulfur and organic matter