moved all SQL queries into single Database module

Yeah, it used to be `db` was the connection object directly attached to
`EnsemblRelease`. Now it's part of a `Database` object and it seemed wise
to make clear that this is a connection object.

On Fri, Dec 12, 2014 at 4:07 PM, Tavi Nathanson <notifications@github.com>
wrote:
>
> In pyensembl/database.py
> <https://github.com/hammerlab/pyensembl/pull/16#discussion-diff-21773240>:
>
> > +
> > +    def _connect_or_create_database(self):
> > +        """
> > +        If database already exists, open a connection.
> > +        Otherwise, create it.
> > +        """
> > +        db_path = self.local_db_path()
> > +        if exists(db_path):
> > +            db = sqlite3.connect(db_path)
> > +            # maybe file got created but not filled
> > +            if datacache.db.db_table_exists(db, 'ensembl'):
> > +                return db
> > +        return self._create_database()
> > +
> > +    @property
> > +    def connection(self):
>
> This looks different. Maybe just renamed?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/hammerlab/pyensembl/pull/16/files#r21773240>.
>