[Astro-2020 White Paper on cosmology and the early universe with third-generation GW detectors (2019)]