Added Mockery to dev requirements
Moved autoloading of tests to phormium config
New functions in DB to help with mocking

Also moved the information if a connection is in transaction to the
Connection object, instead of it being in DB. Makes more sense.