Managing microbial communities in membrane biofilm reactors