Fix issue #153: losing PRIMARY KEY and AUTOINCREMENT keywords

Patch Database::tableFields() to return the correct type when
dealing with a PRIMARY KEY [AUTOINCREMENT] field.

The cost of this solution is an extra SELECT query for each primary
key.
Fix detection of autoincrement in SqlTableModel::setTable()

The algorithm detecting the autoincrement nature of a primary key is
slightly wrong. All primary keys are autoincrementing, but the
AUTOINCREMENT keyword has a different meaning. See [1].

Use the previous patch to correctly guess if a primary key is
AUTOINCREMENT.

[1] http://www.sqlite.org/autoinc.html
Merge pull request #3 from vaussard/fix-issue-153

Fix issue #153