Modified fixMode slightly so that you can specify a set of allowed modes (useful e.g. if you want to let a mode be in rate/spiking mode, but not direct)