upload: Reincrementing badly deployed profiles

If a host is booting and match a profile, the amount of hosts to deploy
is decremented in the state file.

But if this host is failing at deploying, we get a situation were the
system is counted as deployes while it's not the case.

This patch reincrement the counter in the state file if the deploiement
fails.

On an embedded setup, the state file is updated locally while we do it
on a server if a remote edeploy server is used.

Obviously, this patch is only needed if the amount of server to deploy
is different than '*'.