Add get_ref to result which allows modifying a reference instead of returning a value.

Added support for get_ref and changed the existing get to call get_ref
internally.

Fixed warning about not using SQLSMALLINT.

Changed transaction_impl's destructor to turn auto commit on if the
connection has no transactions and is connected.  This was needed
because  the last query in transaction_test would not be committed which
would cause the queries in exception_test to hang.

Added a new scope in simple_test to ensure the statement is cleaned up
in results destructor.  Without this change closing the connection was
failing because of an unfinalized prepared statement.

Changed the check for affected_rows in simple_test to be 0 instead of 4.
This was needed because the SQLite driver always returns 0 for select
statements.