Coherence and chaos in the driven damped sine-Gordon equation: measurement of the soliton spectrum