Grab stats for PostgreSQL 9.1
Don't error out when there's no stats

When there's no stat, the table sqlite_stat1 doesn't exist. If it doesn't
exist, one SQL query got an error, and the whole PostgreSQL query using that
foreign table fails.

This patch checks the existence of the sqlite_stat1 table. If it exists, it
will query it for the number of estimated rows. If it doesn't, it will use an
hardcoded value as the estimation. This value comes from sqlite (EXPLAIN
SELECT * FROM a_table, without stats).