Macroscopic dynamics of neural networks with heterogeneous spiking thresholds.