[Abridged] Recent results from the BICEP, Keck Array and Planck
Collaborations demonstrate that Galactic foregrounds are an unavoidable
obstacle in the search for evidence of inflationary gravitational waves in the
cosmic microwave background (CMB) polarization. Beyond the foregrounds, the
effect of lensing by intervening large-scale structure further obscures all but
the strongest inflationary signals permitted by current data. With a plethora
of ongoing and upcoming experiments aiming to measure these signatures, careful
and self-consistent consideration of experiments' foreground- and
lensing-removal capabilities is critical in obtaining credible forecasts of
their performance. We investigate the capabilities of instruments such as
Advanced ACTPol, BICEP3 and Keck Array, CLASS, EBEX10K, PIPER, Simons Array,
SPT-3G and SPIDER, and projects as COrE+, LiteBIRD-ext, PIXIE and Stage IV, to
clean contamination due to polarized synchrotron and dust from raw
multi-frequency data, and remove lensing from the resulting co-added CMB maps
(either using iterative CMB-only techniques or through cross-correlation with
external data). Incorporating these effects, we present forecasts for the
constraining power of these experiments in terms of inflationary physics, the
neutrino sector, and dark energy parameters. Made publicly available through an
online interface, this tool enables the next generation of CMB experiments to
foreground-proof their designs, optimize their frequency coverage to maximize
scientific output, and determine where cross-experimental collaboration would
be most beneficial. We find that analyzing data from ground, balloon and space
instruments in complementary combinations can significantly improve component
separation performance, delensing, and cosmological constraints over individual
datasets.Comment: 37 pages plus appendices, 15 figures; first two authors contributed
equally to this work; forecasting tool available at http://turkey.lbl.gov.
v4: matches version published in JCAP (with extended dark energy constraints