A Mechanistic Study of Halogen Interaction with Polyamide Reverse-Osmosis Membranes