Refactor work with TaskLog in sqlalchemy.api
Refactor work with TaskLog in sqlalchemy.api

Add _task_log_get_query() private method
It is used to remove from task_log_get() and task_log_get_all() session.
parametr and save performance.

task_log_get() method
Remove session parameter from public method.

task_log_get_all() method
Remove session parameter from public method.

task_log_begin_task()
Remove session parameter from public method.
Remove unused return value.

task_log_end_task()
Remove session parameter from public method.
Use 1 db request instead of 2.
Remove unused return value.

blueprint db-session-cleanup

Change-Id: I2c8252de7978e8fddd800e903f18a73ee9a95034

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