Improve SQLite3 error detection

In some queries such as SET NAMES utf8; it would return false as technically it'd fail but it's not an error (that's what SQLite literally says). SMF should also verify that there's a valid error code in order to ensure sqlite isn't simply skipping the query.

Related to #40

Signed-off-by: Shitiz Garg <mail@dragooon.net>
Fix SQLite3 installer

The installer had a few problems:
1) It was using multi-value/multi-row INSERTs, something which are not supported by SQLite3
2) Double declaration of primary keys in some tables, causing them to be not created (and the installer would skip them thinking they're duplicates
3) messages table had incorrect definition for modified_reason column

Related to #40

Signed-off-by: Shitiz Garg <mail@dragooon.net>
Merge pull request #1671 from Dragooon/sqlite

Some SQLite Fixes