Space Telescope and Optical Reverberation Mapping Project. XII. Broad-line Region Modeling of NGC 5548