Bacterial reduction of perchlorate and nitrate in water