Tell SQLite to enforce foreign keys.
Tell SQLite to enforce foreign keys.

Fixes bug 1021023.

This requires SQLite version 3.6.19 or greater.  Older versions of
SQLite have no support for enforcing foreign keys.  However, SQLite
ignores unknown PRAGMA commands rather than treating them as errors,
so this change should be harmless with old versions of SQLite.

SQLAlchemy events require SQLAlchemy 0.7 or greater.  But other code
in this module already uses events, so this change should impose no
new SQLAlchemy version requirements.

Change-Id: Ic3eeeddbe012af65fe18c884674699cf16725d8d

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