Spikes as temporal beliefs and the optimal temporal integration of uncertain information in networks of spiking neurons