Fixes #1110542 Set deployed/active hosts correctly

Updates the host group table on the deployment show page to calculate
the deployed successfully / deployed with errors / deploying hosts total
for each host group.  Since all hosts are not deployed until after the
deployment has finished.  The update checks for the lock on the deployed
to determine whether this deployment is complete or not.

Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1110542
bad indentation