Use unsafe FFI calling convention for sqlite3 entry points

FFI calling convention for C functions defaults to 'safe' which incurs
a heavy per-call overhead.  Use of 'unsafe' should be fine for several
of the sqlite3 column and binding accessors as they do not callback to
Haskell from C.  Furthermore, no I/O should be happening in these
accessors, all these functions do is move data over from C land to
Haskell.

The less frequently entry points are left in default 'safe' mode.
This is just a defensive move for future code maintenance.

Performance delta in a synthetic benchmark such as
https://github.com/nurpax/db-bench is significant.  Benchmarking the
direct-sqlite 'columns' call, we can see an improvement from 1.2M
rows/sec to 2.9M rows/sec.  The nice thing about this is that
direct-sqlite now also beats Python sqlite3 module by about 50%.
Merge pull request #20 from nurpax/unsafe

Optimize FFI: Use unsafe FFI calling convention for column data accessors
Bump version to 2.3.
Upgrade SQLite 3.7.13 -> 3.7.15

http://www.sqlite.org/changes.html#version_3_7_15

Don't forget to apply the stat64 hack (commit 6890f68) after updating sqlite3
sqlite3.c: Apply stat64 hack (see commit 6890f68)
test: keep withConn from overriding the original error with an error from 'close'

Also, remove "import Prelude hiding (catch)".  We aren't using 'catch'.
Address cabal warnings regarding extensions and default-language
Document c_SQLITE_TRANSIENT
Add Eq instances to CError and CColumnType
Change CInt to Int in public API newtypes (fixes #16)

Now we use CParamIndex/CColumnIndex/CColumnCount in the FFI bindings,
and Int-based ParamIndex/ColumnIndex/ColumnCount elsewhere.
We even use the Int-based types in Direct, so users can use both
Direct and the high-level API without constantly wondering how many Cs
to type before ColumnCount.

Also, add encodeError and encodeColumnType.  The former
will come in handy when we add bindings for the new sqlite3_errstr()
(added in 3.7.15).  Not adding the bindings yet, so people who use systemlib
don't get a linker error.
Add bindings for sqlite3_interrupt

To test this, we now run the tests with the threaded RTS.  It'd be nice to run
tests both with and without -threaded, but I don't know how to configure that
without duplicating all 24 lines of the test-suite section in the .cabal file
Merge pull request #21 from joeyadams/interrupt-etc

Upgrade SQLite3 to 3.7.15, don't leak CInt to public API, and add 'interrupt'
Fix mistakes in definition of CExecCallback

CExecCallback was not used by the higher-level interfaces, so this bug would
have only affected people using the FFI bindings.
No need for fromIntegral in 'bind', now that ParamIndex has an Int inside
Add lastInsertRowId, changes, and totalChanges

I deliberately did not export 'totalChanges' from Database.SQLite3,
to avoid confusion with 'changes'.
Improvements to Utf8 newtype wrapper

 * Add Ord and Monoid instances

 * Make Show instance correspond to IsString instance. Namely, don't show the
   Utf8 wrapper, and use Data.Text's show instance to render Unicode escapes
   instead of byte escapes.
Add execPrint, execWithCallback, and interruptibly
Merge pull request #22 from joeyadams/execPrint

Add execPrint, lastInsertRowId, and other improvements
Accidentally-never-previously-committed .cabal bump to 2.3.1.
Merge commit 'ba52477093fb9b8633e4c418a9e03c0122c9408f'