Probing the Bose glass–superfluid transition using quantum quenches of disorder