Prevents crash if an interface doesn't have an address

On some of my systems, I have a bond interface that doesn't have an address. Without this change, Chef crashes when it tries to iterate over the null addrs["addresses"] element.
I had to split it to several functions because of cyclic complexity.