The Dispersion Measure and Scattering of Fast Radio Bursts: Contributions from the Intergalactic Medium, Foreground Halos, and Hosts