Use local database variable instead of CI `$this->db`

In this pull request, I've updated the `$this->db` variable in the `_set_database` method to use a local class variable named `$this->_database`. I had an issue where some of my models use one database, others another, and others another. When `$this->db` was used, my global CI database connection was overwritten without any way to set it back. By using this local variable, that ceases to be an issue.