Smoothing Codes and Lattices: Systematic Study and New Bounds