Measurement of the four-lepton invariant mass spectrum in 13 TeV proton-proton collisions with the ATLAS detector