Fast control of dissipation in a superconducting resonator