How white noise generates power-law switching in bacterial flagellar motors