Space Telescope and Optical Reverberation Mapping Project. VIII. Time Variability of Emission and Absorption in NGC 5548 Based on Modeling the Ultraviolet Spectrum