Tracing and testing multiple generations of contacts to COVID-19 cases: cost–benefit trade-offs