Merge branch 'master' into direct-module
Database.SQLite3: Steal module organization from .Direct
Update API of Database.SQLite3 to make it more like .Direct

 * Rename 'bind' to 'binds', and add a new 'bind' function which only binds a
   single parameter.

 * Use ParamIndex etc. in Database.SQLite3

 * Move SQLData from .Direct to Database.SQLite3
Database.SQLite: Have reset and finalize discard the error

In my comment, I use the fictitious type SQLError.  I plan to introduce this
type in a future commit, as an exception users can catch.
Database.SQLite3: Extend sqlError to take a message string if one is available

sqlite3_exec (optionally) returns the error message.  According to the source
code, this comes from sqlite3_errmsg.  There's a slight advantage to using
sqlite3_exec's string, as opposed to calling sqlite3_errmsg ourselves: it gets
the error string while it still has the mutex.  Otherwise, another thread could
access the sqlite3 object and clobber the error message.
Database.SQLite3: Added exec and clearBindings

The main reason I added clearBindings is so we can warn users that 'reset'
doesn't do that automatically.
Database.SQLite3: Throw our own exception type, rather than using 'fail', if SQLite3 reports an error
Direct.SQLite3: Export unchanged functions directly from .Direct

Benefits:

 * We only have to maintain the documentation in one place.

 * When the user clicks the Source link in Haddock, they'll see something more
   informative than just "columnType = Direct.columnType"
Add upstream documentation links to Database.SQLite3 like we have in .Direct

Also, move documentation of 'exec' and 'prepare' (other than the link)
from .Direct to Database.SQLite3.  For each function, we want documentation
that applies to every level of abstraction to be in Database.SQLite3, where
more users can see it.  For .Direct and .Bindings, we only want information
that pertains to that level.
direct-sqlite.cabal: Make the release history more pretty

To make a paragraph break in a .cabal description,
use a line with a dot by itself.
Update test suite to build with new API
Database.SQLite3: Don't export underlying definition of Database and Statement

However, the underlying definition is still exported from .Direct and .Bindings.
Document Direct.SQLite3.binds
Rename 'binds' back to 'bind', and name the other function to 'bindSQLData'

 * This makes porting code to the new API slightly easier.

 * If we want to add a function for binding named parameters, we can more
   comfortably name it 'bindNamed'.
Direct.SQLite3 (exec): Say 'zero or more' instead of 'one or more'

sqlite3_exec succeeds harmlessly if the query string contains no statements.
Write custom Show instances for ParamIndex and ColumnIndex so they don't show the data constructor

ParamIndex and ColumnIndex are supposed to look and feel like regular integers.
With the default Show instances, this would have a hidden quirk:

    stmt <- prepare conn "SELECT ?, ?, ?"
    count <- bindParameterCount stmt
    putStrLn $ "This query has " ++ show count ++ " parameter(s)"

This would print "This query has ParamIndex 3 parameter(s)".

Here are a few other newtypes that might benefit from a Show instance
like this, but are less user-facing:

 * Utf8

 * CError

 * CColumnType

 * CNumBytes
Fix some minor issues detected by hlint
Database.SQLite3: Remove 'errmsg'

 * The 2.0 API did not export 'errmsg'

 * This content is provided in the SQLError exception, in 'sqlErrorDetails'.
Database.SQLite3.Bindings.Types: Remove the "Conversion helpers"

These are all just fromIntegral, since ParamIndex, ColumnIndex, and CNumBytes
have Integral instances (as of commit a5ef9c1).
Update test suite to actually support shared database testing

The original comment said:

    -- Note that some tests, such as Notify, use multiple connections, and
    -- assume that 'testConnect' connects to the same database every time
    -- it is called.

This is a holdover from postgresql-simple, and does not apply to SQLite3
":memory:" databases.  To facilitate tests involving concurrent transactions,
this commit adds support for opening a database file that is shared by all
tests, using the separate 'withConnShared' entry point.