Designing a space-based galaxy redshift survey to probe dark energy