Solitons in the nonlinear Schrödinger model and the collective ground state of a one-dimensional delta-function gas