Revert "[imp][32131] Refactored method to use server variables. Fixes #3886"

This reverts commit 67f506a66f6bf47a121996c0249cae307f203ed7.

Jenkins failed with:
````
JDatabaseDriverMysqliTest::testGetCollation
Line:130 The getCollation method should return the collation of the database.
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'utf8_general_ci'
+'latin1_swedish_ci'

/var/lib/jenkins/jobs/cms/workspace/tests/unit/suites/database/driver/mysqli/JDatabaseDriverMysqliTest.php:131
````
and
````
JDatabaseDriverMysqlTest::testGetCollation
Line:130 The getCollation method should return the collation of the database.
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'utf8_general_ci'
+'latin1_swedish_ci'

/var/lib/jenkins/jobs/cms/workspace/tests/unit/suites/database/driver/mysql/JDatabaseDriverMysqlTest.php:131
````