Allow customizing DB connection for ActiveDataProvider.
Added unit test for ActiveDataProvider.