fix foreign table name quotation in schema table and Sqlite platform and add more robust tests