Merge pull request #15 from joeyadams/master

A few minor improvements before the next release
Prep for 2.1 release.
Merge branch 'master' of github.com:IreneKnapp/direct-sqlite

Conflicts:
	direct-sqlite.cabal
Cabal file changes.
One more thing to .cabal
Lower text package version to 0.11 to play nice with HP

Haskell Platform provides text-0.11.2.0 but direct-sqlite was
requiring text-0.11.2.2.  This caused installation of direct-sqlite to
install another copy of text which lead to linking problems for some
users.

See issue #18 on github.
Bump direct-sqlite version up to 2.2.1
Merge pull request #19 from nurpax/text-0.11

lower required text library version
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'