Functional, biochemical and genetic diversity of prokaryotic nitrate reductases