refactor plugin activation code to remove code duplication

Also previously TaskMultiplier plugins could not be disabled due to
a small oversight.