Restore loadapp checking
Restore loadapp checking

This problem surfaced when Red Hat QA started installing Grizzly
and hit a regression from Folsom. If something is wrong with
permissions (it may be SElinux, or any other problem), the servers
in 1.8.0 enter a loop, spamming logs with huge tracebacks at a rate
of a one to two each second, depending how many workers are there.
In 1.7.4, the server exited with an error message.

The offending commit is 9efa9be167b972a234ecccd9ba37bdd8a949381e,
"Separate wsgi init from web-front-end activation". It relocates
the probing invocation of loadapp() in front of drop_privileges().
But in such case, it runs as root and thus may succeed while the
rest of the server fails.

The fix is to return loadapp to the place it was in Folsom. Since
the init_request_processor() is used when running under Apache,
preserve that API too.

Change-Id: I166332eb9375229aefed6b9c3ef1a992a3e4efd0

smerritt/swift,hurricanerix/swift,iostackproject/IO-Bandwidth-Differentiation,larsbutler/swift,citrix-openstack-build/swift,matthewoliver/swift,takeshineshiro/swift,xiaoguoai/ec-dev-swift,eatbyte/Swift,redhat-openstack/swift,psachin/swift,maginatics/swift,prashanthpai/swift,thiagodasilva/swift,dpgoetz/swift,tipabu/swift,dpgoetz/swift,bouncestorage/swift,tipabu/swift,Khushbu27/Tutorial,maginatics/swift,revoer/keystone-8.0.0,clayg/swift,gold3bear/swift,levythu/swift,swiftstack/swift,psachin/swift,redhat-openstack/swift,rackerlabs/swift,hbhdytf/mac2,mjwtom/swift,hurricanerix/swift,bradleypj823/swift,matthewoliver/swift,revoer/keystone-8.0.0,hurricanerix/swift,notmyname/swift,openstack/swift,orion/swift-config,larsbutler/swift,smerritt/swift,Akanoa/swift,matthewoliver/swift,hbhdytf/mac2,mjzmjz/swift,rackerlabs/swift,Em-Pan/swift,Akanoa/swift,shibaniahegde/OpenStak_swift,matthewoliver/swift,williamthegrey/swift,orion/swift-config,zackmdavis/swift,JioCloud/swift,Seagate/swift,sarvesh-ranjan/swift,swiftstack/swift,iostackproject/IO-Bandwidth-Differentiation,notmyname/swift,dencaval/swift,prashanthpai/swift,dencaval/swift,psachin/swift,nadeemsyed/swift,tipabu/swift,Khushbu27/Tutorial,zaitcev/swift-lfs,bkolli/swift,tsli/test,notmyname/swift,NeCTAR-RC/swift,mjwtom/swift,williamthegrey/swift,scality/ScalitySproxydSwift,notmyname/swift,citrix-openstack-build/swift,scality/ScalitySproxydSwift,shibaniahegde/OpenStak_swift,zaitcev/swift-lfs,zackmdavis/swift,nadeemsyed/swift,Seagate/swift,citrix-openstack/build-swift,eatbyte/Swift,hurricanerix/swift,smerritt/swift,tsli/test,daasbank/swift,AfonsoFGarcia/swift,Em-Pan/swift,daasbank/swift,clayg/swift,xiaoguoai/ec-dev-swift,psachin/swift,NeCTAR-RC/swift,mjzmjz/swift,IPVL/swift-kilo,clayg/swift,aerwin3/swift,openstack/swift,wenhuizhang/swift,clayg/swift,wenhuizhang/swift,hbhdytf/mac,smerritt/swift,redbo/swift,swiftstack/swift,takeshineshiro/swift,thiagodasilva/swift,levythu/swift,sarvesh-ranjan/swift,nadeemsyed/swift,nadeemsyed/swift,aerwin3/swift,openstack/swift,gold3bear/swift,citrix-openstack/build-swift,IPVL/swift-kilo,openstack/swift,JioCloud/swift,AfonsoFGarcia/swift,bradleypj823/swift,hbhdytf/mac2,tipabu/swift,redbo/swift,anishnarang/gswift,bkolli/swift,hbhdytf/mac,hbhdytf/mac2,bouncestorage/swift,anishnarang/gswift