[rql2sql] Test and fix some case of sql generation
when an unstable variable (ie whose type change from one solution to another) is
used in an EXISTS node but belongs to an outer scope.
Closes #13518646.
addressbook
basket
blog
book
calendar
comment
company
email
file
folder
i18ncontent
keyword
link
mailinglist
person
tag
timeseries
vcsfile