pactl/pacmd should allow you to unload modules by name. For modules with multiple instances, some behaviour needs to be defined. Either remove the last instance, or all instances? (or even fail, and require unload by index)
Fixed by poljar: http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=48f4c8ab8f2f7878bf6816ad166f036037f841b2 http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=23432d39ee83ce773941a045b8e6f0527b1336fb
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.