Structural and mechanistic analysis of the arsenate respiratory reductase provides insight into environmental arsenic transformations