Hysteresis, neural avalanches, and critical behavior near a first-order transition of a spiking neural network.