Rewrite do_chef_client() in crowbar_join

The old code was broken: if the first call to chef-client failed, then
we were putting the node in "recovering" state and calling a chef-client
again. This would normally pass as nearly nothing happens in this state;
we would then happily pretend that the node is "ready".

In a different case of brokenness, when we go to "installed" state and
run chef-client, if it succeeds, we then go straight to the final state
(ready) and run chef-client, skipping the "readying" state.

Now, we always try to have a successful chef-client in "readying" state
(either on first try, or after having moved to "recovering" /
"installed").

Note that the "ready" state is set on success later on anyway.
Merge pull request #298 from vuntz/crowbar_join-chef-calls

Rewrite do_chef_client() in crowbar_join
Avoid crowbar_register exiting prematurely

As the script is executed with bash -e it would exit too early when the first
NIC was not on the admin network.
Merge pull request #302 from rhafer/crowbarregister

Avoid crowbar_register exiting prematurely