bug: 43858 Do not select the whole terms table and then do a query for each row

Killed continuation functionality and introduced some other issues (all very much less serious then the removed one), see FIXMEs

Change-Id: I80079160297a24bc844f74faaf171020f4f003a8
Merge "bug: 43858 Do not select the whole terms table and then do a query for each row"