Existence, uniqueness, and construction of the density-potential mapping in time-dependent density-functional theory