Gravar-mail: Signal Processing and Flagellar Motor Switching During Phototaxis of Halobacterium salinarum