Add some more tests for AsyncDatabaseConnection and resolve some bugs around error handling in observable subscriptions.