Reduce SQL queries for /api/table/country #2358

Use in-memory cache for population and grab survey with questionnaire
to avoid extra query