Fix sqlite autoincrement detection
Separate test into own function
Merge branch 'DBAL-792' into 2.4