Spontaneous activity emerging from an inferred network model captures complex temporal dynamics of spiking data