wait_for_pxe function

in order to prevent a node from getting stuck due to a slow admin
node the node should wait for the proper pxe file to contain the
correct state before proceeding
Several fixes for wait_for_pxe

This includes:
 - code cleanup
 - use the right IP address to compute the pxe file: this is the address
   of the node on the admin network, not MYIP
 - fix grep command when waiting for a specific state
 - do not use curl --head when fetching the content of the file
Merge pull request #179 from vuntz/wait-for-pxe

https://github.com/crowbar/barclamp-provisioner/pull/179

Merged by devtool for cloudsleuth