Support external transactions.

This keeps the DB transaction (and connection) open until commit or rollback is called, or until dispose is called which issues a rollback if a transaction is in progress.
Throw error if trying to run query without transaction = true while external transaction is open.
Minor refactorings and unit tests!
Merge pull request #2 from ctigeek/Transactions

Transactions