Break down _bind_port_if_needed in ML2
Break down _bind_port_if_needed in ML2

Separate the looping and retry logic in _bind_port_if_needed
from the actual binding attempts. This also eliminates the
'while True' loop with a regular for loop counter to make it
a little easier to reason about.

A suggestion to do this came up in a code review for
I437290affd8eb87177d0626bf7935a165859cbdd because the function
was difficult to reason about.

Change-Id: I6171cf39a4562ed1da9467e8e604d4519a813977

asgard-lab/neutron,javaos74/neutron,cloudbase/neutron,sebrandon1/neutron,eayunstack/neutron,jumpojoy/neutron,mahak/neutron,jumpojoy/neutron,adelina-t/neutron,openstack/neutron,takeshineshiro/neutron,huntxu/neutron,openstack/neutron,chitr/neutron,noironetworks/neutron,asgard-lab/neutron,mattt416/neutron,barnsnake351/neutron,glove747/liberty-neutron,mmnelemane/neutron,JianyuWang/neutron,swdream/neutron,swdream/neutron,shahbazn/neutron,jacknjzhou/neutron,cloudbase/neutron,klmitch/neutron,MaximNevrov/neutron,SamYaple/neutron,klmitch/neutron,sasukeh/neutron,skyddv/neutron,yanheven/neutron,mmnelemane/neutron,bigswitch/neutron,neoareslinux/neutron,igor-toga/local-snat,huntxu/neutron,openstack/neutron,wolverineav/neutron,adelina-t/neutron,glove747/liberty-neutron,mahak/neutron,igor-toga/local-snat,neoareslinux/neutron,takeshineshiro/neutron,jacknjzhou/neutron,vivekanand1101/neutron,dims/neutron,dhanunjaya/neutron,silenci/neutron,bigswitch/neutron,mattt416/neutron,SamYaple/neutron,sasukeh/neutron,vivekanand1101/neutron,eayunstack/neutron,mahak/neutron,apporc/neutron,javaos74/neutron,apporc/neutron,JianyuWang/neutron,wolverineav/neutron,skyddv/neutron,dhanunjaya/neutron,barnsnake351/neutron,MaximNevrov/neutron,dims/neutron,shahbazn/neutron,sebrandon1/neutron,yanheven/neutron,chitr/neutron,silenci/neutron,noironetworks/neutron