Debug order-dependent test failures in CI / ActiveRecord.
At this point it looks like the only remaining cause of the ActiveRecord
failures could be that someone is leaking an active database handle in
ActiveRecord from an unrelated test.
The theory is that if the handle is open, SQLite will try to create a lock
file in a directory that no longer exists during the test; this raises the I/O
error we see here.
To verify this, which can currently only be reproduced in the CI system, we
close off any active handle before changing the database location settings.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>