Stability of bound states for (1+1)-dimensional nonlinear scalar fields