Affinity-mediated capture and release of amphiphilic copolymers for controlling antimicrobial activity