Exploring cosmic origins with CORE: Survey requirements and mission design