Fix Sqlite PK detection

This is used by the db-convert-tool.

These changes are reported in doctrine/dbal#515 and doctrine/dbal#516