Decreasing the bandwidth of linear and nonlinear Thomson scattering radiation for electron bunches with a finite energy spread