Use joinedload for system_metadata in db
Use joinedload for system_metadata in db

When moving over to nova.db.api not returning sqlalchemy
objects, objects won't be lazy loaded throughout the code, instead the
entire object will be fetched from the DB in nova.db.api.  This change
will trigger any lazyload bugs due to missing joinedload statements
that weren't previously triggered because the lazyloaded data wasn't
being used (and thus fetched from the DB).

Partially implements bp db-api-cleanup

Change-Id: I0dabf3588be0076a6e651c018a1c83ed23e84872

maelnor/nova,cernops/nova,shail2810/nova,redhat-openstack/nova,dims/nova,dstroppa/openstack-smartos-nova-grizzly,watonyweng/nova,akash1808/nova,virtualopensystems/nova,NeCTAR-RC/nova,OpenAcademy-OpenStack/nova-scheduler,berrange/nova,klmitch/nova,redhat-openstack/nova,dstroppa/openstack-smartos-nova-grizzly,MountainWei/nova,CloudServer/nova,LoHChina/nova,BeyondTheClouds/nova,belmiromoreira/nova,zzicewind/nova,bigswitch/nova,CiscoSystems/nova,devendermishrajio/nova,leilihh/novaha,plumgrid/plumgrid-nova,shootstar/novatest,noironetworks/nova,maheshp/novatest,ntt-sic/nova,sebrandon1/nova,phenoxim/nova,Yusuke1987/openstack_template,cloudbase/nova-virtualbox,mahak/nova,cloudbase/nova,mmnelemane/nova,fnordahl/nova,fnordahl/nova,DirectXMan12/nova-hacking,gooddata/openstack-nova,klmitch/nova,sacharya/nova,rahulunair/nova,whitepages/nova,gspilio/nova,hanlind/nova,jeffrey4l/nova,saleemjaveds/https-github.com-openstack-nova,rajalokan/nova,Triv90/Nova,JianyuWang/nova,qwefi/nova,plumgrid/plumgrid-nova,vladikr/nova_drafts,Juniper/nova,CCI-MOC/nova,zaina/nova,tudorvio/nova,viggates/nova,eayunstack/nova,jeffrey4l/nova,barnsnake351/nova,petrutlucian94/nova_dev,mikalstill/nova,devendermishrajio/nova,Triv90/Nova,devoid/nova,shahar-stratoscale/nova,ewindisch/nova,petrutlucian94/nova,TieWei/nova,mahak/nova,mmnelemane/nova,openstack/nova,TieWei/nova,viggates/nova,petrutlucian94/nova,adelina-t/nova,gooddata/openstack-nova,angdraug/nova,mandeepdhami/nova,luogangyi/bcec-nova,CCI-MOC/nova,rajalokan/nova,cloudbase/nova,orbitfp7/nova,silenceli/nova,akash1808/nova,spring-week-topos/nova-week,Juniper/nova,eonpatapon/nova,alaski/nova,leilihh/nova,yrobla/nova,tudorvio/nova,alvarolopez/nova,blueboxgroup/nova,yrobla/nova,bigswitch/nova,BeyondTheClouds/nova,kimjaejoong/nova,JianyuWang/nova,openstack/nova,vladikr/nova_drafts,dawnpower/nova,apporc/nova,maheshp/novatest,CEG-FYP-OpenStack/scheduler,dawnpower/nova,maelnor/nova,akash1808/nova_test_latest,rajalokan/nova,leilihh/nova,ruslanloman/nova,berrange/nova,nikesh-mahalka/nova,cyx1231st/nova,projectcalico/calico-nova,openstack/nova,maheshp/novatest,eayunstack/nova,klmitch/nova,double12gzh/nova,imsplitbit/nova,yosshy/nova,thomasem/nova,Juniper/nova,bgxavier/nova,LoHChina/nova,bgxavier/nova,gooddata/openstack-nova,zhimin711/nova,mandeepdhami/nova,gooddata/openstack-nova,sacharya/nova,sridevikoushik31/nova,j-carpentier/nova,cloudbase/nova,whitepages/nova,gspilio/nova,rahulunair/nova,DirectXMan12/nova-hacking,edulramirez/nova,JioCloud/nova_test_latest,zaina/nova,citrix-openstack-build/nova,takeshineshiro/nova,takeshineshiro/nova,vmturbo/nova,angdraug/nova,imsplitbit/nova,affo/nova,ntt-sic/nova,tianweizhang/nova,alvarolopez/nova,cyx1231st/nova,ruslanloman/nova,alaski/nova,Tehsmash/nova,petrutlucian94/nova_dev,scripnichenko/nova,Brocade-OpenSource/OpenStack-DNRM-Nova,bclau/nova,SUSE-Cloud/nova,rickerc/nova_audit,ted-gould/nova,cloudbase/nova-virtualbox,edulramirez/nova,mikalstill/nova,CiscoSystems/nova,Metaswitch/calico-nova,double12gzh/nova,qwefi/nova,varunarya10/nova_test_latest,eharney/nova,belmiromoreira/nova,Juniper/nova,projectcalico/calico-nova,tanglei528/nova,tangfeixiong/nova,alexandrucoman/vbox-nova-driver,shail2810/nova,yatinkumbhare/openstack-nova,joker946/nova,raildo/nova,Yuriy-Leonov/nova,mikalstill/nova,nikesh-mahalka/nova,sridevikoushik31/nova,sridevikoushik31/openstack,spring-week-topos/nova-week,BeyondTheClouds/nova,orbitfp7/nova,devoid/nova,noironetworks/nova,shahar-stratoscale/nova,CEG-FYP-OpenStack/scheduler,ted-gould/nova,vmturbo/nova,vmturbo/nova,cloudbau/nova,barnsnake351/nova,leilihh/novaha,tianweizhang/nova,apporc/nova,rrader/nova-docker-plugin,Stavitsky/nova,watonyweng/nova,iuliat/nova,kimjaejoong/nova,JioCloud/nova,SUSE-Cloud/nova,TwinkleChawla/nova,varunarya10/nova_test_latest,mahak/nova,DirectXMan12/nova-hacking,TwinkleChawla/nova,felixma/nova,citrix-openstack-build/nova,sebrandon1/nova,j-carpentier/nova,silenceli/nova,NeCTAR-RC/nova,sridevikoushik31/openstack,rajalokan/nova,isyippee/nova,cloudbau/nova,cernops/nova,ewindisch/nova,Triv90/Nova,Tehsmash/nova,phenoxim/nova,virtualopensystems/nova,tealover/nova,Metaswitch/calico-nova,hanlind/nova,jianghuaw/nova,rahulunair/nova,joker946/nova,isyippee/nova,Stavitsky/nova,dstroppa/openstack-smartos-nova-grizzly,OpenAcademy-OpenStack/nova-scheduler,eharney/nova,eonpatapon/nova,mgagne/nova,jianghuaw/nova,cernops/nova,rickerc/nova_audit,klmitch/nova,zzicewind/nova,JioCloud/nova_test_latest,blueboxgroup/nova,Yuriy-Leonov/nova,akash1808/nova_test_latest,yrobla/nova,devendermishrajio/nova_test_latest,mgagne/nova,MountainWei/nova,luogangyi/bcec-nova,raildo/nova,badock/nova,Francis-Liu/animated-broccoli,sebrandon1/nova,bclau/nova,devendermishrajio/nova_test_latest,hanlind/nova,badock/nova,adelina-t/nova,yatinkumbhare/openstack-nova,JioCloud/nova,tealover/nova,sridevikoushik31/nova,yosshy/nova,Francis-Liu/animated-broccoli,rrader/nova-docker-plugin,tangfeixiong/nova,gspilio/nova,jianghuaw/nova,saleemjaveds/https-github.com-openstack-nova,alexandrucoman/vbox-nova-driver,affo/nova,sridevikoushik31/openstack,thomasem/nova,shootstar/novatest,zhimin711/nova,scripnichenko/nova,felixma/nova,iuliat/nova,dims/nova,sridevikoushik31/nova,Brocade-OpenSource/OpenStack-DNRM-Nova,tanglei528/nova,jianghuaw/nova,CloudServer/nova,vmturbo/nova,Yusuke1987/openstack_template