Produce better SQL queries for "instance_select_query". The new version allows to specify the base_table, which is either cr_revisions (default) or the automatically generated view (such as e.g. xowiki_pagei). This change allows to avoid joins of large tables, which might be in large installations slow allthough all involved join conditions are indexed. The join with acs-objects is now as well done only when needed (maybe we add an option for make this explicit later, when needed).