Significantly reduce N+1 queries in /api/v4/todos endpoint Closes #40378 See merge request gitlab-org/gitlab-ce!25711