Infer the 'image' URL correctly when inserting a server.
Infer the 'image' URL correctly when inserting a server.

When inserting (creating) a new server, using a private (project
specific) image, the code would infer the resource URI for the
image incorrectly, because it would try to find the image in the
current project using an incorrect method to access the name of
the project. This patch fixes the variable reference, and changes
the loop logic to try all known project names in the same fashion.

Refs #1933

SpryBTS/fog,dtdream/fog,surminus/fog,dhague/fog,sideci-sample/sideci-sample-fog,adamleff/fog,mavenlink/fog,dtdream/fog,martinb3/fog,rackspace/fog,adamleff/fog,ack/fog,TerryHowe/fog,asebastian-r7/fog,Ladas/fog,lwander/fog,nandhanurrevanth/fog,adecarolis/fog,theforeman/fog,brilliomsinterop/fog,joshisa/fog,b0ric/fog,petems/fog,github/fog,glennpratt/fog,bdunne/fog,joshmyers/fog,mohitsethi/fog,mohitsethi/fog,papedaniel/fog,seanhandley/fog,lwander/fog,MSOpenTech/fog,github/fog,phillbaker/fog,dpowell7/fog,mitchlloyd/fog,theforeman/fog,dhague/fog,dLobatog/fog,cocktail-io/fog,pravi/fog,rackspace/fog,covario-cdiaz/fog,nicolasbrechet/fog,brilliomsinterop/fog,brilliomsinterop/fog,glennpratt/fog,ManageIQ/fog,backupify/fog,yyuu/fog,Programatica/fog,pyama86/fog,covario-cdiaz/fog,zephyrean/fog,dLobatog/fog,sapcc/fog,NETWAYS/fog,TerryHowe/fog,mavenlink/fog,icco/fog,12spokes/fog,martinb3/fog,zephyrean/fog,nicolasbrechet/fog,nandhanurrevanth/fog,nalabjp/fog,phillbaker/fog,eLobato/fog,runtimerevolution/fog,sapcc/fog,pyama86/fog,asebastian-r7/fog,unorthodoxgeek/fog,plribeiro3000/fog,NETWAYS/fog,yyuu/fog,pravi/fog,fog/fog,surminus/fog,ManageIQ/fog,eLobato/fog,adecarolis/fog,kongslund/fog,alphagov/fog,brandondunne/fog,SpryBTS/fog,dustacio/fog,papedaniel/fog,sideci-sample/sideci-sample-fog,unorthodoxgeek/fog,bryanl/fog,ack/fog,nandhanurrevanth/fog,cocktail-io/fog,mitchlloyd/fog,Ladas/fog,b0ric/fog,10io/fog,bryanl/fog,runtimerevolution/fog,icco/fog,10io/fog,alphagov/fog,Programatica/fog,MSOpenTech/fog,joshmyers/fog,petems/fog,fog/fog,sferik/fog,backupify/fog,phillbaker/fog,nalabjp/fog,displague/fog,duhast/fog,kongslund/fog,plribeiro3000/fog,seanhandley/fog,displague/fog,b0e/fog,joshisa/fog,duhast/fog,zephyrean/fog,dustacio/fog