Inverse scattering. IV. Three dimensions: generalized Marchenko construction with bound states, and generalized Gel’fand–Levitan equations