Nitrogen removal and microbial communities in a three-stage system simulating a riparian environment