add close methods to ConnectionProvider and Database