Make instance_update_and_get_original() atomic
Make instance_update_and_get_original() atomic

Use the same session object within a transaction to retrieve
and update the instance object, including metadata and system
metadata.

In preparation to fix bug 1037372

Change-Id: I886da12bb85f60c2b23609a35b6d9a43040216ce

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