Begin rule2sql refactoring

I still not know what would be the cleanest way to do it…
Add virtual tag $feed_<feed_id>

Only for selection, not for ordering yet.