Fix circular import in glance/db/sqlalchemy
Fix circular import in glance/db/sqlalchemy

Fix running test_migration solely.

api.py depends on models.py that depends on api.py.
Import statements in these files are such that api.py
must be imported before models.py. That's why usually
test_migrations doesn't fail when all tests are launched.
However, thus test_migration depends on test running order
making testing procedure unreliable, including parallel testing.

Move glance.db.sqlalchemy.api import to the only place
where it's required in models.py

Change-Id: Ib20dde8edd3473595aac1ca8bbaa5a0d3116a697
Fixes: bug #1154058

klmitch/glance,SUSE-Cloud/glance,tanglei528/glance,ntt-sic/glance,vuntz/glance,openstack/glance,jumpstarter-io/glance,darren-wang/gl,redhat-openstack/glance,kfwang/Glance-OVA-OVF,cloudbau/glance,citrix-openstack-build/glance,ozamiatin/glance,dims/glance,klmitch/glance,dims/glance,sigmavirus24/glance,paramite/glance,SUSE-Cloud/glance,JioCloud/glance,akash1808/glance,takeshineshiro/glance,tanglei528/glance,vuntz/glance,stevelle/glance,stevelle/glance,jumpstarter-io/glance,takeshineshiro/glance,wkoathp/glance,rajalokan/glance,openstack/glance,rajalokan/glance,ozamiatin/glance,kfwang/Glance-OVA-OVF,rickerc/glance_audit,sigmavirus24/glance,saeki-masaki/glance,rickerc/glance_audit,cloudbau/glance,scripnichenko/glance,JioCloud/glance,scripnichenko/glance,wkoathp/glance,darren-wang/gl,citrix-openstack-build/glance,akash1808/glance,ntt-sic/glance,openstack/glance,saeki-masaki/glance,redhat-openstack/glance,paramite/glance