Gapless spin liquid and valence-bond solid in the J1 - J2 Heisenberg model on the square lattice: Insights from singlet and triplet excitations