A mathematical study of the ecology that shapes microbial communities of nitrifiers