Gravar-mail: Estimating a Dynamic State to Relate Neural Spiking Activity to Behavioral Signals during Cognitive Tasks